If you are creating an object inside a function and you want to return a pointer &/or reference to that object then it must be created on the heap (e.g. using new keyword). If you use your first tchnique
COleDateTime pDates[2];
In this case the pointer will not be pointing to a valid address...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.