PDA

View Full Version : C++ help on mac




muthuveerappan
Feb 9, 2009, 05:23 AM
Hi,

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.

Thanks,
Muthu



ChOas
Feb 9, 2009, 05:44 AM
type 'man pow' in the terminal.

or man <whatever function you are looking for>

The manual pages are very handy.

muthuveerappan
Feb 9, 2009, 05:51 AM
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).

Cromulent
Feb 9, 2009, 06:01 AM
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).

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.

muthuveerappan
Feb 9, 2009, 06:16 AM
Thanks a ton !!

mobilehaathi
Feb 9, 2009, 10:17 AM
http://www.cplusplus.com/ is great as a reference.:)