been a long summer so im a bit rusty
have yet to figure out how to use the dev c++ debugger with an allegro graphic program so im kind of winging it and here is where i problem comes when i use a class function that uses a pointer parameter and then uses that pointer parameter to as the parameter for a second mutator function. Somehow when i attempt to use function it, something goes wrong (i think it doesnt change the pointer passed in).
here is a general idea of what im talking about
shouldnt this code work in properly changing the ptr based on the code within func1 and func2?
have yet to figure out how to use the dev c++ debugger with an allegro graphic program so im kind of winging it and here is where i problem comes when i use a class function that uses a pointer parameter and then uses that pointer parameter to as the parameter for a second mutator function. Somehow when i attempt to use function it, something goes wrong (i think it doesnt change the pointer passed in).
here is a general idea of what im talking about
Code:
void func1(pointer* p)
{
....
func2(p);
}
void func2(pointer*p)
{
....
}
void func3()
{
pointer* ptr;
func1(ptr);
}
shouldnt this code work in properly changing the ptr based on the code within func1 and func2?