C++ api????

Discussion in 'Mac Programming' started by xwk88, May 24, 2005.

  1. xwk88 macrumors regular

    May 3, 2005
    is there such a thing as an api for c++ I know for java there is an online documentation is there on for c++ anywhere I can't find it, that would be very helpful.
  2. csubear macrumors 6502a


    Aug 22, 2003
    c++ api??

    prehaps you are thinking about c++ standard libaries.

    if that is so check out stl on sgi website.

    just google stl sgi
  3. bousozoku Moderator emeritus

    Jun 25, 2002
    Gone but not forgotten.
    If you're looking for a standard GUI reference for C++, there is none. Even, for Windows, you can find at least 3 different sets of frameworks to access the GUI and other features.
  4. mattraehl macrumors 6502

    Feb 26, 2005
    If you are trying to create a graphical user interface with C++, there is no reference api. But there are plenty of options! You might check out http://www.wxwidgets.org/ for one. The benifit of this particular option is that it is cross-platform, meaning it is (relatively) easy to port your application to Mac, Windows, and *NIX (X11).
  5. csubear macrumors 6502a


    Aug 22, 2003

    Or trolltech's Qt framework.
  6. Mitthrawnuruodo Moderator emeritus


    Mar 10, 2004
    Bergen, Norway
    Another vote for Qt... a true cross-platform C++ api. Same code (more or less) can be compiled for Mac OS X, Windows and Linux.
  7. admanimal macrumors 68040

    Apr 22, 2005
    Some clarification of terms may help you.

    First of all, C++ and Java are just programming languages that provide the basic constructs (loops, conditionals, object-oriened stuff) needed to build any program. Then there are various libraries or APIs that exist for either language that are basically pre-built routines that you can call from your own programs, usually aimed at making common yet complicated or tedious tasks available with no extra work for you. The online documentation for Java that you are referring to is actually for one of Sun's "official" Java APIs, which includes everything from Vector classes to the GUI routines. There is no official C++ API that supports as broad of a range of things as the Sun Java APIs. For C++, there is the Standard Library, which includes strings and vectors and other common abstract data types and related functions. Then there are GUI librarys like Qt, and platform-specific libraries like the (horribly complicated) Microsoft Foundation Classes, which of course are meant for developing Windows apps. (There is also the Win32 API, but that is geared towards C).

    You may have also heard of Carbon and Cocoa, which are Apple's Mac OS APIs for C and Objective-C, respectively.

    I don't know exactly what you are intending to do, but if you are unfamiliar with programming and have a choice, Java might be a good place to start learning how to use an API to build a good sized application, or if you are a little more adventurous, try Cocoa with Objective-C since the tools and documentation are all free.

Share This Page