?
Solved

c++ question

Posted on 2000-04-20
3
Medium Priority
?
302 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 240 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

770 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