Hi,
I have a structure, that reads someting like:
Have to write a copy function,Code:struct _B { int info; struct _C *p4; } typedef struct _A{ int a,b,c; int *p1; char *p2; struct _B *p3; /* Many more pointers */ }A;
A *make_copy(A *src);
i.e. make_copy makes a copy of 'src' and returns. Note that it should properly copy pointers also (i.e. make copy of pointer members also).
Apart from copying member by member, is there any other way to do same?