By Shoter

2018-11-08 23:12:59 8 Comments

Is there any difference in using _cdecl_ vs __cdecl (1 underscore vs 2 underscores) in function declaration?

I am using Visual Studio 2017 with standard tools that comes with it.


@P.W 2018-11-09 06:37:45

__cdecl is the default calling convention for C and C++ programs used by Microsoft Compiler.

In fact, all of its calling conventions follow the same pattern of double underscore before the name.

_cdecl_ seems to be just another name for __cdecl defined using a macro.

Related Questions

Sponsored Content

21 Answered Questions

[SOLVED] What is the "-->" operator in C++?

35 Answered Questions

5 Answered Questions

[SOLVED] What are the rules about using an underscore in a C++ identifier?

16 Answered Questions

[SOLVED] What is the difference between const int*, const int * const, and int const *?

31 Answered Questions

19 Answered Questions

4 Answered Questions

[SOLVED] What is the difference between 'typedef' and 'using' in C++11?

15 Answered Questions

21 Answered Questions

[SOLVED] Why should I use a pointer rather than the object itself?

  • 2014-03-03 11:54:16
  • gEdringer
  • 276866 View
  • 1435 Score
  • 21 Answer
  • Tags:   c++ pointers c++11

24 Answered Questions

[SOLVED] What does the C++ standard state the size of int, long type to be?

  • 2009-02-26 07:59:23
  • Jérôme
  • 1174279 View
  • 656 Score
  • 24 Answer
  • Tags:   c++ c++-faq

Sponsored Content