Hello! I am having an issue with reading from a file and outputting to a file. We are to use a struct called employeeType where we will have string fname, string lname, double current_salary, double pay_increase, and double updated_salary inside of the struct. I get a compiler error saying:
26 28 F:\Class stuff\Programming\Object-Oriented Programming\Homework\Project 2\Project_struct\employee.cpp [Error] 'setprecision' was not declared in this scope
Are you sure that this is code you compiled to get those errors? The errors don't seem to match the code.
Here are the errors that the online compiler generates(press the gear icon):
1 2 3 4 5 6
In function 'int main()':
26:28: error: 'setprecision' was not declared in this scope
42:11: error: 'fname' was not declared in this scope
42:19: error: 'lname' was not declared in this scope
44:103: error: invalid operands of types 'const char [7]' and 'const char [16]' to binary 'operator<<'
Here is the error's again. I double checked and it is consistent.
Errors:
F:\Class stuff\Programming\Object-Oriented Programming\Homework\Project 2\Project_struct\employee.cpp In function 'int main()':
26 28 F:\Class stuff\Programming\Object-Oriented Programming\Homework\Project 2\Project_struct\employee.cpp [Error] 'setprecision' was not declared in this scope
42 11 F:\Class stuff\Programming\Object-Oriented Programming\Homework\Project 2\Project_struct\employee.cpp [Error] 'fname' was not declared in this scope
42 19 F:\Class stuff\Programming\Object-Oriented Programming\Homework\Project 2\Project_struct\employee.cpp [Error] 'lname' was not declared in this scope
44 103 F:\Class stuff\Programming\Object-Oriented Programming\Homework\Project 2\Project_struct\employee.cpp [Error] invalid operands of types 'const char [7]' and 'const char [16]' to binary 'operator<<'