-
-
Save jitpaul/5026e58c4ed64b9da30b72cb0fc2812d to your computer and use it in GitHub Desktop.
Constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Example1 { | |
public: | |
Example1() { cout << "Inside Example 1\n"; } | |
}; | |
class Example2{ | |
Example1 e1; | |
public: | |
Example2() { cout << "Inside Example 2\n"; } | |
}; | |
int main() { | |
Example2 e2; | |
cin.get(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment