Hi,
I am having problem with Classes, I have made a small program of Classes which is :
------------------------------------------Code:main() Class Student ------------------(1) { public : Student(): //constructor defined some functions here. private: int age; int grade; char name; char address; }; { Student mystudent; ------------(2) /* manipulate the data members { mystudent.age; mystudent.address; mystudent.name; mystudent.grade; }
I have made this small program of Class, I have also defined the data members of the data but when I compile the program, it gives me error messege.Am I geting this error because the class is defined private?
How can I make the data members in (2) to access the Class in (1)?
I hope my questions are clear