Assuming i have a pointer to a structure
StructA a* which contains value. Now in between computation i want to keep a backup of the structure by storing the a in b which is also an object of StructA i,e StructA b*.
What is the best way to copy the structure .
i cant to b=a coz that wud point reference b to a and not a backup.
I tried memcopy(b,a,sizeof(a)) but i realised sizeof(a) gives the size of the structure and not the contents