i am beginner to c++ when i open the file "stdio.h" i have found the
line
_CRTIMP int __cdecl remove (const char*);
and similar lines to it
so what's "_CRTIMP"
and
"__cdecl"
and the use of them
notice: i use mingw
_CRTIMP is proprably a macro in MSVC crt library, which is short for
CRT Implemetation I guess, you can check it out in the <crtdefs.h>
it works as __declspec(dllimport) when you're a client programmer
(most of us), and nothing when the library developer is building the
library. It's switched by the preproccessor _DLL.
__cdecl is the default c/c++ function calling convention specifier,
you don't have to it because it's default (the compiler will add it
for you if no specifier for the function); as a library function, they
expicitly write it out maybe because of portability
other calling conventions include: fastcall, thiscall, pascal ...