Advertisement
Felanpro

Konstruktor

Mar 20th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Airplane
  5. {
  6.     public:
  7.         Airplane()
  8.         {
  9.             string x = "object";
  10.             cout << "An " << x <<  " of class Airplane has been created!" << endl;
  11.         }
  12.     private:
  13.         string x;
  14. };
  15.  
  16. int main()
  17. {
  18.     Airplane object;
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement