Click to See Complete Forum and Search --> : Keywords that I don't understand


C#er
July 2nd, 2007, 07:26 PM
Hi fellows

I'm programming C++ approximately 1 1/2 year, and I programming for windows too. But some keywords I don't know exactly what they are and when I use them. That's my question:
What the meaning of terms and when I use them:

__stdcall
__pascal
__fastcall
__thiscall
inline


It seems that's beginner question but I would like some answer to this question

Thanks for help again

wildfrog
July 2nd, 2007, 07:50 PM
The four first keywords are called calling conventions. They typically decide how arguments are passed between functions (on the stack, through registers etc.) and who's responsible for cleaning up (the calling function or the called function).

http://msdn2.microsoft.com/en-us/library/984x0h58(vs.71).aspx

The inline keyword notifies the compiler that you want to 'inline' the function. That is, instead of calling the function it should 'copy and paste' (expand) the whole function code (into where-ever it's being called).

http://msdn2.microsoft.com/en-us/library/z8y1yy88(VS.80).aspx

- petter