C++ syntax
-
i am a C++ student and i was reading some source code and found this :
void FGAPIENTRY glutMenuStateFunc( FGCBMenuState callback )
{
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStateFunc" );
fgState.MenuStateCallback = callback;
}in the code above , the return type is void and the function name is glutMenuStateFunc() .. what does FGAPIENTRY stand for and where dois it come from?? I've also seen some similar stuff wile reading a tutorial in win32 api
-
i am a C++ student and i was reading some source code and found this :
void FGAPIENTRY glutMenuStateFunc( FGCBMenuState callback )
{
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStateFunc" );
fgState.MenuStateCallback = callback;
}in the code above , the return type is void and the function name is glutMenuStateFunc() .. what does FGAPIENTRY stand for and where dois it come from?? I've also seen some similar stuff wile reading a tutorial in win32 api
FGAPIENTRY
is defined somewhere in your header chain (you have to look there to find it) as an attribute of the function. OnWindow
s code a similar define is often used to adddllexport/dllimport
attribute to the same function, depending on the kind of build you are performing (theDLL
itself or the application using the sameDLL
). See, for instance c++ - Macro for dllexport/dllimport switch - Stack Overflow[^]. -
i am a C++ student and i was reading some source code and found this :
void FGAPIENTRY glutMenuStateFunc( FGCBMenuState callback )
{
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStateFunc" );
fgState.MenuStateCallback = callback;
}in the code above , the return type is void and the function name is glutMenuStateFunc() .. what does FGAPIENTRY stand for and where dois it come from?? I've also seen some similar stuff wile reading a tutorial in win32 api
-
i am a C++ student and i was reading some source code and found this :
void FGAPIENTRY glutMenuStateFunc( FGCBMenuState callback )
{
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutMenuStateFunc" );
fgState.MenuStateCallback = callback;
}in the code above , the return type is void and the function name is glutMenuStateFunc() .. what does FGAPIENTRY stand for and where dois it come from?? I've also seen some similar stuff wile reading a tutorial in win32 api
Ratul Thakur wrote:
...what does FGAPIENTRY stand for...
Look in your project's header files. It resolves to this.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles