New to C++: Compilers?

I've just decided that I want to learn C++. I have some experience with Java so C++ shouldn't be [i]too[/i] different, right?

First things first: I need a C++ compiler. I searched google for C++ compilers and already got confused. I see there are many different types of compilers such as Apple C++, Borlan C++, Digital Mars C++, and so on. Which one(s) should I get?

Second: I need to learn C++. Does anyone have any good tutorials for beginners like me?

Thanks a lot

[495 byte] By [KingCobra220] at [2007-11-26 8:32:07]
# 1

> I've just decided that I want to learn C++. I have

> some experience with Java so C++ shouldn't be

> [i]too[/i] different, right?

> First things first: I need a C++ compiler. I

> searched google for C++ compilers and already got

> confused. I see there are many different types of

> compilers such as Apple C++, Borlan C++, Digital Mars

> C++, and so on. Which one(s) should I get?

Well, since you're on Sun forum, you should obviously get Sun compiler (strangely enough not listed by you) :-) CC is a part of Sun Studio, downloadable for free at http://developers.sun.com/prodtech/cc/downloads/index.jsp

> Second: I need to learn C++. Does anyone have any

> good tutorials for beginners like me?

Despite your knowledge of Java I would recommend buying a book. For a person with programming background, I'd recommend http://www.research.att.com/~bs/3rd.html

MaximKartashev at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

>Well, since you're on Sun forum, you should obviously get Sun >compiler (strangely enough not listed by you) :-) CC is a part of Sun >Studio, downloadable for free at >http://developers.sun.com/prodtech/cc/downloads/index.jsp

I may be missing something here...I got to the download page, logged in, and saw that there were three downloads (Solaris SPARC, Solaris x86, and Linux x86). I'm running windows XP...any ideas?

>Despite your knowledge of Java I would recommend buying a book. >For a person with programming background, I'd recommend >http://www.research.att.com/~bs/3rd.html

Thanks for the link. I'll definitly check it out.

KingCobra220 at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

> I may be missing something here...I got to the

> download page, logged in, and saw that there were

> three downloads (Solaris SPARC, Solaris x86, and

> Linux x86). I'm running windows XP...any ideas?

Since this forum is devoted to Sun Studio C++ compiler, I assumed you hava a Linux or Solaris installed. I suggest you try other sources of information on WinXP C++ compiler.

MaximKartashev at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

Speaking of C++ compilers...

I downloaded Sun Studio 11; however, I am not able compile any source code that I have. All I am able to do, is run the GUI that shows and do "makes" on the tutorial programs (I think that there is only a few) that show up in the C++ folder.

Is there anything like g++ that is available for Solaris 10 (1/06) that is already built? (i.e. without having to configure/build/install - GNU)?

I bought the DVD and it came with the companion CD, but it doesn't appear to be included, any suggestions would greatly be appreciated.

hendersb at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
hendersb: You're looking for CC (C++) and cc (C), which you can use by adding /opt/SUNWspro/bin to your path.If you want g++/gcc, I believe they're available in /usr/sfw/bin in Solaris 10 update 1 and 2, but I stand corrected...
r1mikey at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6

r1mikey,

Thank you. I had found "CC" (and added it to my path). Not sure what is going on with my system.

It wasn't working earlier, so I shutdown went for a walk, came back, went on-line, checked this site (in hopes that someone would respond).

While in the middle of responding to you, I started the system back up to write up the errors that I was seeing, and lo and behold... it makes a liar out of me by compiling my program [i][/i][b][/b][u][/u]AND[u][/u][i][/i][b][/b] it executes the program?!? Go figure?

Well, I appreciate the response, I hope that others might learn from this (if there is a lesson to be learned?).

Thanks again.

hendersb at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 7

> I may be missing something here...I got to the

> download page, logged in, and saw that there were

> three downloads (Solaris SPARC, Solaris x86, and

> Linux x86). I'm running windows XP...any ideas?

Since you are running Windoze XP, here is a link that I have used:

http://sources.redhat.com/cygwin/

This C++ compiler is easy to install, the "readme" file walks you through setting up the XP path. It isn't like djgpp, the window functions like it is running Unix/Linux and doesn't close down when the program you built and executed ends.

Of course, you won't be able to run any of the programs that you build on anything but the machine that you compile your program on, but at least you'll be able to write your code (in Wordpad), compile and run the program. Hope that this helps.

hendersb at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 8
Don't forget that if you do need to run on Windows XP, you can still use Netbeans and the C++ plugin for development (if you choose to use a gcc-based compiler on Windows).
r1mikey at 2007-7-6 21:55:36 > top of Java-index,Development Tools,Solaris and Linux Development Tools...