reference to pointer
void GetData( sFOO *&fooIn )
{
char *pCH = "ABC";
sFOO *lPoo = new sFOO();
memcpy( lPoo->foo, pCH, strlen(pCH));
fooIn = lPoo;
};
int _tmain(int argc, _TCHAR* argv[])
{
sFOO *lpFOO = XE_NULL;
GetData( lpFOO );
}
void GetData( sFOO *&fooIn )
{
char *pCH = "ABC";
sFOO lPoo;// = new sFOO();
memcpy( lPoo.foo, pCH, strlen(pCH));
*fooIn = lPoo;
};
int _tmain(int argc, _TCHAR* argv[])
{
sFOO Foo;
sFOO *lpFOO = &Foo; //= XE_NULL;
GetData( lpFOO );
}
{
char *pCH = "ABC";
sFOO *lPoo = new sFOO();
memcpy( lPoo->foo, pCH, strlen(pCH));
fooIn = lPoo;
};
int _tmain(int argc, _TCHAR* argv[])
{
sFOO *lpFOO = XE_NULL;
GetData( lpFOO );
}
void GetData( sFOO *&fooIn )
{
char *pCH = "ABC";
sFOO lPoo;// = new sFOO();
memcpy( lPoo.foo, pCH, strlen(pCH));
*fooIn = lPoo;
};
int _tmain(int argc, _TCHAR* argv[])
{
sFOO Foo;
sFOO *lpFOO = &Foo; //= XE_NULL;
GetData( lpFOO );
}
Comments
Post a Comment