D:\C++\class employee\main.cpp: In function 'int main()':
D:\C++\class employee\main.cpp:53:22: error: expected primary-expression before '.' token
int a, biggest = item.largest, total = item.sum;
^
D:\C++\class employee\main.cpp:56:9: error: expected unqualified-id before '.' token
item.input(a);
^
D:\C++\class employee\main.cpp:59:23: error: 'total' was not declared in this scope
cout<<endl<<"Sum:- "<<total;
^
D:\C++\class employee\main.cpp:61:45: error: expected primary-expression before '.' token
cout<<endl<<endl<<"Display:- "<<endl<<item.display(t);
^
Process terminated with status 1 (0 minute(s), 0 second(s))
9 error(s), 0 warning(s) (0 minute(s), 0 second(s))
You are trying to pass a multidmensional array to cin.getline, basically you're passing it a pointer to array of pointers.
You are trying to use largest as if it where a variable inside itself while it is a function.
cout.write again try to use a multidimensiona array.
Your calls to item.largest or item.sum again lack the () that specify they are functions.
Also calls like item.input(a); are using the variable type without creating a variable of that type first.
A proper call would be
1 2
item I;
I.input(a);
Switch to Visual Studio, it underline in red all this mistakes while you write them, spot them all without the need to read your code, very begginner friendly ;)
Where did you create an instance of your class named "item"? Remember that a class is an User Defined Type so in order to use members of that class you must first create an instance of that class and then use that instance.
1 2 3
item my_item; // Create an instance of your class.
int biggest = my_item.largest(); // Note that you are calling a member function not accessing a member variable.