Link to home
Start Free TrialLog in
Avatar of pb_india
pb_india

asked on

Memory allocation

What is the right way to use (and Why?)

wchar_t *ploc = NULL;
ploc=new wchar_t[4096];

1.       ploc = OLE2W( bsLocation);
Or.
2. wchar_t* ploc =  OLE2W( bsLocation);
or use wcsncpy?

or is there any better way....
ASKER CERTIFIED SOLUTION
Avatar of rajeev_devin
rajeev_devin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Deepu Abraham
Deepu Abraham
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial