Hi friends,
One of my class member function is supposed to return an array of integers. Here's the function.
int* MyClass::getallVars()
{
int* a = new int;
int b[] =
{
GetparentVar1(),
GetparentVar2(),
GetchildVar1(),
GetchildVar2(),
};
a=b;
return a;
}
Is there anyway I can do this without the use of second array "b"?