









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Data members, Encapsulated in the class, Public member functions, Interface to the class, Function Inside Class Body, Function Outside Class Body, Inline Functions are points you can learn in this Object Oriented Programming lecture.
Typology: Slides
1 / 16
This page cannot be seen from the preview
Don't miss anything!










class Student{
int rollNo;
public:
void setRollNo(int aRollNo){ rollNo = aRollNo; }
};
class ClassName { … public: ReturnType FunctionName (); }; ReturnType ClassName :: FunctionName () { … }
Scope resolution operator
inline int Area(int len, int hi)
{
return len * hi;
}
int main()
{
cout << Area(10,20);
}
class Student{
int rollNo;
public:
void setRollNo(int aRollNo){ … rollNo = aRollNo; }
};
class Student{ … public: inline void setRollNo(int aRollNo); }; void Student::setRollNo(int aRollNo){ … rollNo = aRollNo; }
class Student{ … public: inline void setRollNo(int aRollNo); }; inline void Student::setRollNo(int aRollNo){ … rollNo = aRollNo; }