I just started with c++, and i have a problem with pointing to an address of memeber of class.
When i compile there are no errors, but program breaks when I run it.
You are not allocating memory for
v, and so when you try to access it:
(f.v)->x = &(v1.n1); ^^^ Dereferences 'v'
v can point to any memory address. Dereferencing it is undefined behavior, which sometimes (it is undefined after all) crashes your program.