Original Post
Im using c, not c++.
So i have a struct like this
typedef struct {
int a;
int b;
} foo;
now i have this
foo f1, f2;
f1.a = 1;
f1.b = 2;
if i go like this
f2 = f1;
is it the same as doing this
f2.a = f1.a
f2.b = f1.b
i would think it is, but it seems like f2 = f1 makes f2 point to f1. but f2 isnt a pointer. which behavior is right? does it copy the values, or somethign else?