Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class MINKLASS{
- public:
- void setName(string x){
- name = x;
- }
- string getName(){
- return name;
- }
- private:
- string name;
- };
- int main()
- {
- MINKLASS mo; // mo = mitt-objekt
- mo.setName("Sir Royale Cheese");
- cout << mo.getName();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment