J
JustSomeGuy
I have a function that takes a pointer as an argument...
for example:
void myFunc(unsigned int * parameter)
how can I call myFunc with the result of a function without defining a
variable
to hold the parameter... ie.
main()
{
myFunc(&AnotherFunc()); // Wont work..
int p = AnotherFunc();
myFunc(&p); // Will work.
}
Will using a reference rather than a pointer help here?
for example:
void myFunc(unsigned int * parameter)
how can I call myFunc with the result of a function without defining a
variable
to hold the parameter... ie.
main()
{
myFunc(&AnotherFunc()); // Wont work..
int p = AnotherFunc();
myFunc(&p); // Will work.
}
Will using a reference rather than a pointer help here?