Original Post
This is what Im trying to do: I want to know why "myint" is still NULL after the call to foo(). Must I do something more like the following?
void foo( int* bar )
{
// lets make a memory leak!
bar = new int(5);
}
int main ()
{
int* myint = NULL;
foo( myint );
return 1;
}
void foo( int** bar )
{
*bar = new int(5);
}