Solved

Learning C++

Posted on 2004-08-22
8
249 Views
Last Modified: 2010-04-01
I have been looking on Amazon for a book to teach myself C++ and am wondering if anyone can help?

I have a good understanding of programming, but unfortunately only of relatively obsolete languages and need to learn languages that will be more useful within industry, so I do not need to learn how to program e.t.c, just the C++ language.

From what I can gather C is a procedural language, whereas C++ is Object Orientated, is it worth learning both for industry or just C++?  I know this can depend on what type of programming I plan to do, but at the moment I don't know.

Also there are many different types of C, mainly just different compilers, but again which one should I choose? Which one would be the most useful?

Finally getting back to my original point of which book to choose, the problem is that every author and his dog seem to have written a book on C programming!  There are literally thousands to choose from, any ideas?
0
Comment
Question by:Stupot
8 Comments
 
LVL 48

Assisted Solution

by:AlexFM
AlexFM earned 50 total points
ID: 11864111
0
 
LVL 55

Assisted Solution

by:Jaime Olivares
Jaime Olivares earned 100 total points
ID: 11864119
I always recommend this on-line book from Bruce Eckel: Thinking in C++, also comes in printed version:
http://www.bruceeckel.com/Books/TICPP/ThinkingInCPP2e.html
About proper compiler, this is a hard question. If you want to develop for Windows environment only, then Microsoft Visual C++.net will be the best choice in my opinion.
About cross-platform compilers, any variant of the GNU C++ compiler will be useful. Also you will need a portable GUI like wxWindows (wxwidgets.org) or QT (www.trolltech.com).
Take a look to this useful page:
http://www.thefreecountry.com/compilers/cpp.shtml
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11864128
BTW. I have not copied AlexFM suggestion, just have spent more than 3 minutes in writting my post.
0
 

Accepted Solution

by:
sterhar earned 100 total points
ID: 11877662
I would recommend two books on C++.

First read, "C++ How to Program" By Harvey M. Deitel and Paul J. Deitel. This is a later edition of the first book I read on C++. It is an excellent introduction to C++ that covers the basics well.

Once you read that book and gain more experience, I would read "The C++ Programming Language" By Bjarne Stroustrup. The author of this book is the original designer of C++. He goes into a lot more detail and covers several advanced topics that other books don't get into.

Here are amazon links to the two books:

http://www.amazon.com/exec/obidos/tg/detail/-/0130384747/qid=1093317732/sr=8-3/ref=pd_ka_3/103-5376721-5416654?v=glance&s=books&n=507846

http://www.amazon.com/exec/obidos/ASIN/0201700735/qid=1093317755/sr=ka-1/ref=pd_ka_1/103-5376721-5416654
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Assisted Solution

by:guntherothk
guntherothk earned 50 total points
ID: 11882252
If you already understand programming, then learning C is just learning how the selection and looping statements are spelled in C, and what library functions are available. Learning C will only take a few weeks. All the C compilers are pretty much equivalent.

However, there is no reason to learn C if you already know how to program. C skills are no longer particularly prized in the job market. There are more productive programming languages than C.

Object oriented programming is a superset of procedural programming; a way to break big problems up into individual objects that each are small enough to use the older paradigm on. It is worth learning object oriented programming if you intend to do any serious work.

C++ is an elegant and powerful language, but requires a significant time investment to master. Acedemic programs like to teach Java because it is simpler. Java's simplicity can translate to lower performance and bigger, messier code, but it's fine for many applications. Microsoft has invented a java lookalike called C#, which you should learn if you believe Microsoft will continue to dominate the world. There isn't a clear winner, so it's hard to place a big bet right now. C++, Java, and C# are all procedural, object oriented languages. They are all in wide use at this time.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11882474
About guntherothk comment, I agree fully with last paragraph. But I think still is a good idea to learn pure C before learning C++, because this allow you to concentrate in some fundamental topics like pointers. Some pure C++ programmers lacks of a clear pointer/buffer awareness, and this topic is one of the cornerstones of C/C++ language.
0
 

Assisted Solution

by:mdroske
mdroske earned 50 total points
ID: 11961610
I would say, that starting off by learning C++ does not prevent you from getting a good understanding about pointers. If you learn C first, then you would have to forget about a lot of things, like callback routines, string handling, io etc and probably the first C++ programs will somehow still reflect some C-style and in the worst case a mixture of both C and C++.

I would suggest to use the Intel Compiler which is freely available on the intel website for non-commercial use. It has a very good optimization for Pentium processors but works also quite well with AMD processors.
In some advanced template cases, its more flexible than g++.

I agree to jaime that thinking in c++ is a very good reference.
0
 

Author Comment

by:Stupot
ID: 12244412
Sorry it's taken me so long to reply, but my computer has ben in for repair and has takeen ages to be returned.  

Anyhow, i've looked at the reports for both the books mentioned by Sterhar, and am happy that they will be useful, so have ordered them.  Also the free online book mentioned by AlexFM and Jaime Olivares looks useful too, as is the information on which compilers.

Thanks all, for your help!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now