Hello everyone, i am getting a compilation error from the code below. It is when i am naming a variable with my user defined type. Can anyone hint me on how to correct the mistake.
void person :: displaydetails()
{
cout<<"First name is"<<FNAME<<endl;
cout<<"Surname is"<<SNAME<<endl;
cout<<"ID is"<<ID<<endl;
cout<<"Salary is "<<SALARY<<endl;
Hello thePHPdev, here are the error messages, can i have a hint on the problem?
C:\Dev-Cpp\TRIAL.PASS.!!!.cpp In function `int main()':
66 C:\Dev-Cpp\TRIAL.PASS.!!!.cpp expected primary-expression before "p"
66 C:\Dev-Cpp\TRIAL.PASS.!!!.cpp expected `;' before "p"
74 C:\Dev-Cpp\TRIAL.PASS.!!!.cpp `p' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
83 C:\Dev-Cpp\TRIAL.PASS.!!!.cpp `X' undeclared (first use this function)