How would i go about doing this? I am new to C++ and taking a class for it, and just want to see what this might look like.

What would a code segment look like that defines a class definition for student, also including two properties and two methods. And a reason to why there is a public and private section associated with class definitions. Just trying to grasp this a little better, as i am a beginner in C++ and i just don't understand the text book.
1
2
3
4
5
6
7
8
class student
{
	// members, usually left private
	
	public:
		Type function1();
		// more member functions
};


You should read this:
http://www.cplusplus.com/doc/tutorial%20/classes/

And please next time consider a shorter title.
Last edited on
Topic archived. No new replies allowed.