C++OOP Question



Hey I am not too sure what the s.readClasses() is for? am I suppose to make a class above with this with name s in order to use it? I just need an explanation on the s. and how I can access them.

Thank you!
Last edited on
Student s(12345, "test", "bob", "123 Main Street", "San Mateo, CA
94123");

Here Student is the Class.

And s is Object of Class Student


Have to Create Class for Student. Like,

class Student{
int rollno;
int a,b,c;
public :
Student(int rno,int a,int b,int c) // Constructor
{
this->rollno = rno;
this->a = rno;
this->b = rno;
this->c = rno;

}

int readClasses()
{
//Statement
}
int printTranscript()
{
//Statement
}
int addClass()
{
//Statement
}

};
Hey I am not too sure what the s.readClasses() is for?


Is this the complete problem statement?

Is there any other context? (e.g. does it follow on from other questions; does it relate to a particularr course? etc);

But -- as umadbei said -- given the notation, s must be an object/instance of a class.
Last edited on
s.readClasses() ;

In this readClasses is the function in student class. It can acces through Student class Object s.

May be , you have to read the values for "class member variables" from externally(files or database)...that may be the funtionality of Readclasses funtion
Topic archived. No new replies allowed.