Skip to content

Instantly share code, notes, and snippets.

@olenhad
Created September 7, 2013 15:09
Show Gist options
  • Save olenhad/6476410 to your computer and use it in GitHub Desktop.
Save olenhad/6476410 to your computer and use it in GitHub Desktop.
#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