Skip to main content
gamedev.net
🔒 Locked

Strange function call coding

Started by discodowney 1 reply 750+ views
Original Post
discodowney
discodowney
This is in C++. Im looking through code. Part of it has the following

void __stdcall function1(int param1, Byte param2, void* param3)
{
//function code
}

then when its called its as a parameter to another function


Result = function2(param1, function1, (void *) param3);

Function1 is being called with no parameters. There is no default values set for these parameters so can anyone explain to me whats goin on here?

Cheers
SimonForsman
SimonForsman

This is in C++. Im looking through code. Part of it has the following

void __stdcall function1(int param1, Byte param2, void* param3)
{
//function code
}

then when its called its as a parameter to another function


Result = function2(param1, function1, (void *) param3);

Function1 is being called with no parameters. There is no default values set for these parameters so can anyone explain to me whats goin on here?

Cheers



Result = function2(param1, function1, (void *) param3); does not call function1 , it passes a pointer to function1 to function2, the actual call is made inside function2.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
discodowney
discodowney
Seems so obvious now. Cheers.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.