M
mieskola
Given the following struct definition:
struct Data
{
int i;
ComplexType c;
};
do either of the following copying methods have a programmatic
advantage? Style?
Data d;
Data e;
d.i = 4;
..
..
..
METHOD 1: e = d;
METHOD 2: memcpy(&e,&d, sizeof(d));
struct Data
{
int i;
ComplexType c;
};
do either of the following copying methods have a programmatic
advantage? Style?
Data d;
Data e;
d.i = 4;
..
..
..
METHOD 1: e = d;
METHOD 2: memcpy(&e,&d, sizeof(d));