#include<iostream.h>View more random threads:
- how interface and implementation are seprated from each...
- we will apply single rotation and which will apply double...
- Is constructor necessory in c++? And if than why?
- explain the copy constructor, shallow copy, and deep copy...
- Explain the difference between state and attribute in c++...
- C++ stringstream array to int in c++ 2011
- please tell me a proper defination of a function?
- some features of PREPROCESSOR in c and C++
- What is difference among Binary Tree, Complete Binary Tree...
- ASCII code of c++
Sponsored Links
using namespace std;
class Student
{
private:
int rollNo;
public:
void setRollNo(int aRollNo);
};
void Student::setRollNo(int aRollNo){
if(aRollNo>0){
cout<<"you are a student of vitual university";
}
else{
cout<<"you are not student of virtual univerity";
}
}
int main()
{
Student astudent;
astudent.setRollNo(500);
system("pause");
return 0;
}
There are currently 1 users browsing this thread. (0 members and 1 guests)