C++ help on mac

Discussion in 'Mac Programming' started by muthuveerappan, Feb 9, 2009.

  1. muthuveerappan macrumors newbie

    Aug 17, 2008

    I am new mac user, and I am learning C++.

    I use g++ on the terminal to compile my c++ programs.

    I would like to know if there is any built in help on C++ on a mac.

    Like for example, if I wanted to know about the function "pow" then can I get all the details about the function, like purpose of the function, argument list, return type.

    I have used Turbo C on windows which had a detailed help, so was wondering if there was something on a mac.

  2. ChOas macrumors regular

    Nov 24, 2006
    The Netherlands
    man pages

    type 'man pow' in the terminal.

    or man <whatever function you are looking for>

    The manual pages are very handy.
  3. muthuveerappan thread starter macrumors newbie

    Aug 17, 2008
    Thanks a lot !! got 2 more questions

    Thank you so much, was struggling all day .. lol .. :)

    2 more questions:
    1) Is there way to check the version of C++ (or compiler version) ?
    2) Is Xcode required for a mac to compile C++ programs (I had installed xCode on my mac, so don't know if g++ will work without it).
  4. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    1) g++ -v
    2) No, Xcode is what installs g++ for you and all the associated development tools and libraries (such as make etc). Of course you also get the advantage of the Xcode IDE which I think is probably the best IDE I have used on any platform.
  5. muthuveerappan thread starter macrumors newbie

    Aug 17, 2008

Share This Page