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. Advertisements

  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. Advertisements

  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. Advertisements

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. Mark Kamoski
    Replies:
    3
    Views:
    16,520
    Jay B. Harlow [MVP - Outlook]
    Aug 9, 2003
  2. Gopal Prabhakaran

    Difference between HtmlControls and server controls

    Gopal Prabhakaran, Jan 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,585
    Rainer Maurer [MS]
    Jan 26, 2004
  3. hclarius
    Replies:
    1
    Views:
    2,506
    Ed Kaim [MSFT]
    Jul 4, 2004
  4. walala
    Replies:
    3
    Views:
    1,173
    Egbert Molenkamp
    Sep 4, 2003
  5. jakk
    Replies:
    4
    Views:
    13,919
  6. Peter Otten
    Replies:
    1
    Views:
    214
    Mark Lawrence
    Feb 25, 2014
  7. Tim Chase
    Replies:
    5
    Views:
    145
    Tim Chase
    Feb 26, 2014
  8. MRAB
    Replies:
    1
    Views:
    119
    Steven D'Aprano
    Feb 26, 2014
Loading...