Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std;
- class Airplane
- {
- public:
- string name;
- void takeOff()
- {
- cout << "time for takeoff!" << endl;
- cout << name << endl;
- }
- };
- int main()
- {
- Airplane objekt;
- Airplane objekt2;
- objekt.name = "Cj101"; //cout << objekt.name << endl; //Also avaible todo!
- objekt.takeOff();
- objekt2.name = "JC010";
- objekt2.takeOff();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement