Can someone explain what __ means?

This is a discussion on Can someone explain what __ means? within the C Programming forums, part of the General Programming Boards category; Im debugging through some code and saw this: Code: typedef struct { __GLinterface *(*createContext)(__GLimports *imports, __GLcontextModes *modes, __GLinterface *shareGC); } ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Can someone explain what __ means?

    Im debugging through some code and saw this:

    Code:
    typedef struct {
    __GLinterface *(*createContext)(__GLimports *imports,
                                        __GLcontextModes *modes,
                                        __GLinterface *shareGC);
    } __GLXscreenInfo;
    Can someone explain whats going on here? What is with the __ thing?

    is something like casting going on here: *(*createContext)? I just dont understand whats going on here... But it looks like GLinterface is a type (most likely a struct) and we are declaring a pointer to a pointer?

  2. #2
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Names beginning with an underscore are reserved for the compiler. Other than that, they're just part of the names.

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Code:
    typedef struct { // begin struct
    __GLinterface *(*createContext)(__GLimports *imports,
    //return type // function pointer named createContext //first parameter
                                        __GLcontextModes *modes, //second param
                                        __GLinterface *shareGC); //third param
    } __GLXscreenInfo; //typedef name

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. One Easy" C " Question. Please Solve and Explain.
    By RahulDhanpat in forum C Programming
    Replies: 18
    Last Post: 03-24-2008, 01:39 PM
  2. Please explain?
    By neo_phyte in forum C Programming
    Replies: 3
    Last Post: 08-25-2006, 05:23 AM
  3. Pls explain how this program works...
    By Unregistered in forum C Programming
    Replies: 9
    Last Post: 01-05-2002, 08:53 AM
  4. Can someone explain what this means??
    By JamMan in forum C++ Programming
    Replies: 6
    Last Post: 12-05-2001, 01:56 PM
  5. Can someone explain what the EXP(X) function means?
    By raptor2xtreme in forum C++ Programming
    Replies: 2
    Last Post: 11-06-2001, 11:19 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21