Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class One
- {
- int value;
- public:
- void set(int a)
- {
- value=a;
- }
- void print();
- int getValue();
- };
- void One::print()
- {
- cout<<"value="<<value<<endl;
- }
- int One::getValue()
- {
- return value;
- }
- void main()
- {
- One obj;
- obj.set(5);
- obj.print();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement