Hi,
I have a structure as follows.
typedef struct {
int a;
char *c;
int s;
}MEDIA;
main()
{
MEDIA m, n;
char c[] = "feroz";
m.a = 5;
m.c = c;
m.s = 10;
n = m; ->>>>> is this valid?
}
can i use "=" operator to copy data of "m" to "n"?
will it works on all compilers?
Is there any restriction on this?
I have a structure as follows.
typedef struct {
int a;
char *c;
int s;
}MEDIA;
main()
{
MEDIA m, n;
char c[] = "feroz";
m.a = 5;
m.c = c;
m.s = 10;
n = m; ->>>>> is this valid?
}
can i use "=" operator to copy data of "m" to "n"?
will it works on all compilers?
Is there any restriction on this?
Comment