2 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for trantran

[CODE] struct S{ int i; double d; S(const S & incoming_S):i(S.i),d(S.d){} }; void test(){ S myS=S( /*temporary variable*/ S(23,3.14) ); } [/CODE] Questions: 1) During initialisation, is the temporary variable S(23,3.14) actually created or can it (and is it actually for typical compilers such as VS2008) optimised away? 2) Same …

Member Avatar for trantran
0
173
Member Avatar for IndianaRonaldo

char* p=(char*)malloc(10); in the above state ment,has the memory been initialised??...what is the difference between allocatingg it and initialising it?? thanks in avdance...

Member Avatar for IndianaRonaldo
0
206

The End.