Tuesday, July 28, 2009

How do you return a pointer from a function in c++?

Just assign the desired variable to the pointer that was used in the function.

How do you return a pointer from a function in c++?
int* func1()


{


int* a;


return a;


}

sweet pea

No comments:

Post a Comment