Created
September 7, 2013 15:09
-
-
Save olenhad/6476410 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> | |
using namespace std; | |
class Foo | |
{ | |
public: | |
int a; | |
double b; | |
}; | |
int main(int argc, char const *argv[]) | |
{ | |
Foo foo; | |
foo.a = 3; | |
foo.b = 3.4; | |
Foo boo = foo; | |
cout << boo.a << boo.b << endl; | |
boo.a = 5; | |
cout << foo.a<< endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment