Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class FelixClass
- {
- public:
- void setName(string x)
- {
- name = x;
- }
- string getName()
- {
- return name;
- }
- private:
- string name;
- };
- int main()
- {
- FelixClass felixObject;
- felixObject.setName("Felix is best!");
- cout << felixObject.getName() << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement