the difference _cdecl from _thiscall...?

Discussion in 'C++' started by LinusLee, May 16, 2004.

  1. LinusLee

    LinusLee Guest

    I know _cdecl is often used by the static function that has variable args num...
    In _cdecl func... after returnning function, pop args...
    In _stdcall func... before retunning function, pop args...

    but.. how is _thiscall?

    I found it that member function's convention is _thiscall in Visual C++.
    Is ANSI C++ same?

    My english is poor... sorry...
    thanks... :)
    LinusLee, May 16, 2004
    #1
    1. Advertising

  2. LinusLee

    Mike Wahler Guest

    Re: [OT, link] the difference _cdecl from _thiscall...?

    "LinusLee" <> wrote in message
    news:...
    > I know _cdecl is often used by the static function that has variable args

    num...
    > In _cdecl func... after returnning function, pop args...
    > In _stdcall func... before retunning function, pop args...
    >
    > but.. how is _thiscall?
    >
    > I found it that member function's convention is _thiscall in Visual C++.
    > Is ANSI C++ same?


    No. Standard C++ has no such keywords as '_cdecl',
    '_stdcall', or '_thiscall'. Those are implementation
    (MSVC++) -specific keywords. See your Visual C++
    documentation and/or visit www.msdn.microsoft.com
    to learn their meanings, and how and when to use them.
    Note that their use will render your code nonstandard
    and nonportable.

    -Mike
    Mike Wahler, May 16, 2004
    #2
    1. Advertising

  3. > I know _cdecl is often used by the static function that has variable args num...
    > In _cdecl func... after returnning function, pop args...
    > In _stdcall func... before retunning function, pop args...
    >
    > but.. how is _thiscall?
    >
    > I found it that member function's convention is _thiscall in Visual C++.
    > Is ANSI C++ same?
    >
    > My english is poor... sorry...
    > thanks... :)


    There are no such things as _cdecl, _stdcall, or _thiscall is Standard C++.

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    To iterate is human, to recurse divine.
    -L. Peter Deutsch
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Prateek R Karandikar, May 21, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,143
  2. Nick Timkovich
    Replies:
    0
    Views:
    68
    Nick Timkovich
    Feb 25, 2014
  3. Skip Montanaro
    Replies:
    0
    Views:
    64
    Skip Montanaro
    Feb 25, 2014
  4. Peter Otten
    Replies:
    1
    Views:
    76
    Mark Lawrence
    Feb 25, 2014
  5. Peter Otten
    Replies:
    0
    Views:
    64
    Peter Otten
    Feb 25, 2014
Loading...

Share This Page