F
FFMG
Hi,
I am trying to copy some variables from a struct to a derived struct.
If I have something like,
....
struct STRUCTA
{
int numA;
long numB;
float numC;
}
struct STRUCTB public STRUCTA
{
int numD;
}
....
STRUCTA structA = {0,1,2};
STRUCTB structB;
memcpy( &structB, &structA, sizeof( STRUCTA) );
....
//
Is the above code legal to copy the structure from structA to structB
Thanks
F.
I am trying to copy some variables from a struct to a derived struct.
If I have something like,
....
struct STRUCTA
{
int numA;
long numB;
float numC;
}
struct STRUCTB public STRUCTA
{
int numD;
}
....
STRUCTA structA = {0,1,2};
STRUCTB structB;
memcpy( &structB, &structA, sizeof( STRUCTA) );
....
//
Is the above code legal to copy the structure from structA to structB
Thanks
F.