Solved

c++ question

Posted on 2000-04-20
3
288 Views
Last Modified: 2010-04-02
I asked this question earlier but I don't know if it went through or not.  

how do I get c++ to ask the user which employee (1 or 2) they want to see?

I have this but it's probably way off.
// Declare and define variables
{
char fEfirstName[10];
char fElastName[10];
char sEfirstName[10];
char sElastName[10];
double fEgPay;
double fEnPay;
double sEgpay;
double sEnpay;
double grossPay;
// ask user which employee they want to view

cout << "Chose employee 1 or 2 " 
cin >> ???????

0
Comment
Question by:nationnon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Author Comment

by:nationnon
ID: 2734452
Adjusted points from 30 to 60
0
 
LVL 3

Accepted Solution

by:
MDarling earned 60 total points
ID: 2734478
int nEmployee;

do
{
  cout << "Choose Employee 1 or 2: "
  cin >> nEmployee;
}
while(nEmployee<1 || nEmployee>2);

regards,
Mike.

0
 
LVL 1

Author Comment

by:nationnon
ID: 2734490
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question