Jump to content
  • Advertisement
Sign in to follow this  
discodowney

Strange function call coding

This topic is 2592 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!