Hello all. First time posting. I am using something similar to the following code:
const int hbas = somefunctioncal l();
string * ptr = (string*)malloc (hbas*sizeof(st ring));
ptr[0] = "hello world";
I am using VS 2008 on a XP machine. When I watch all the variables and step through the calls malloc seems to have a legit hex pointer but once malloc returns, ptr has <Bad Ptr> for a value....
User Profile
Collapse
-
MorgaG started a topic using malloc to create array of strings does not seem to return proper pointerin Cusing malloc to create array of strings does not seem to return proper pointer
No activity results to display
Show More