C++ help on mac

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

  1. macrumors newbie


    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. macrumors regular

    man pages

    type 'man pow' in the terminal.

    or man <whatever function you are looking for>

    The manual pages are very handy.
  3. macrumors newbie

    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. macrumors 603


    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. macrumors newbie

    Thanks a ton !!

    Thanks a ton !!
  6. macrumors demi-god



Share This Page