Created
February 14, 2014 01:34
-
-
Save kkdai/8994260 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
| #include <stdio.h> | |
| class L | |
| { | |
| private: | |
| int a1=1; | |
| public: | |
| L():a1(2), a2(a1) //Don't use like this, a2 result depends on compiler | |
| {} | |
| ~L() | |
| { } | |
| int a2=1; | |
| void foo1() | |
| { | |
| printf("fun1"); | |
| } | |
| }; | |
| int main(int argc, const char * argv[]) | |
| { | |
| L *l1 = NULL; | |
| l1->foo1(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment