I can't get my code to compile, i need to read in lines from a file and store them in variables. Then i have to construct instances of my class for how many lines there are in the file and take those variables into them.
I'm getting this error :
"a2.cpp:40: error: cannot convert `Employee' to `Employee*' in assignment"
first : you declared a pointer to an object class(in your case P) P should take the address of another object like p = &object;
In you case you should use the new operator
p = new Employee(nameIn,idIn,salaryIn);
dont forget to delete what did you toke
also atof and exit requared the include of <cstdlib>
Finaly Welcom to this website
next time when you want to print some code use code tags or tags your code between