Hey all. I'm helping a friend with his code, and everything compiles fine, but when I try to run it, it only lets me enter the first input, and then it skips to the end of the program. any ideas? let me know if you want to see the code.
ok. so, for say char firstName, what do i replace that with? string firstName? neither of our classes have gone over this yet. he was using double firstName before I took a look at it...
Personally, I leave out the usingnamespace std; and just use std::string instead, but I believe using string in conjunction with usingnamespace std; is the correct way to do it.
A string is an array of chars. Useful for names or sentences, etc, but stick to using char for things like y/n inputs.
hm. alright, so now it looks like this:
string firstName;
string lastName;
double hoursWorked;
double hourlyRate;
double grossPay;
double taxWithheld;
char unionFee;
char extraInsurance;
double takeHomePay;
double numberOfDependants;
but i'm getting an error...Error 1 error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)