Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

I know there was many questions like this one, but please hold on one more. All programming languages I know now are made for web purposes. I've been learning ActionScript, php and a bit of Javascript, AJAX, etc.. I've liked php very much but I'm still looking something I'll really love! That's why I want to try something new. Can You tell me what are positives and negatives of this language? Is there some big example of C++ usage? Is it a good language to start this journey (maybe You can recommend something else)? Are there some good video tutorials which I can buy on CD/DVD? Could You recommend some books?

@edit: After reading Your answers and some info on the internet I'm confused about two languages. Those are C++ and Python. Python can be used for web so it combine great with my current knowledge. But how about Python for desktop applications? Is it hard to build cross-platform apps? Could You compare for me this two languages?

PS. I'm really glad about all of Your answers. It is very helpful for me & it forces me to productive thinking about my future ;)

share|improve this question

closed as not constructive by gnat, MichaelT, Bart van Ingen Schenau, BЈовић, Martijn Pieters May 4 '13 at 23:19

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. If this question can be reworded to fit the rules in the help center, please edit the question.

Maybe you can add what type of programming jobs you've really loved so far? Depending on your passions, you may find that another language other than C++ may be your future. –  Jordan Apr 25 '11 at 6:52
@Jordan So far I've been building websites. Most using Flash with some nice animations (I like beauty created with code ;)). I've also made some CMS's or used some existing open source CMS's. I'm always adding some animations using jQuery to my websites. Which languages I can use to make some messenger or some application like that for example: humanized.com/enso –  smogg Apr 25 '11 at 10:55
consider python. –  Gulshan Apr 25 '11 at 11:16
@Gulshan Could You say something more about this language? Is it maybe similar to some of languages I have experience with? –  smogg Apr 25 '11 at 11:19

7 Answers 7

up vote 21 down vote accepted

Learning C++ is certainly worthwhile, but compared to the languages you already know a huge undertaking.

Listing up the pros and cons of this language and explaining them even superfluously is probably more work than all other languages combined; I am exaggerating - but not much :) If I had to compress them to one sentence I would say that: "C++ is great if you restrict yourself to 80% of its features... the problem is that everybody uses a different set for his 80%".

As a learning path I would recommend to start with the book Accelerated C++ and should you discover that you actually twisted enough to like C++ follow it up with Principles and Practice Using C++ and C++ Templates - The Complete Guide.

Good examples of C++ code are e.g. the JavaScript V8 Engine, the Pluton library.

Some interesting alternatives - from a learning perspective - to C++ are IMHO Haskell and Scala.

Even though it is a not very popular opinion, my recommendation is, that when you decide to start out with C++, do not learn C first! While C is by itself also a very interesting language, IMHO learning C just to learn C++ is a best of no help, at worst it will be detrimental to your efforts. Both are separate languages and should be treated as such.

share|improve this answer
@Alexander Battisti Thank you for your answer! What do You think about C++ and finding work in the future? I've chosen languages I know now cause of money. That's sad but true. That was the fastest way for me to earn some money and do what I like to do. Honestly, I don't wanna work for some company, ever. I like working as a freelancer and I'm thinking it is gonna be harder with C++ than with php for example. –  smogg Apr 24 '11 at 20:58
I'm also interested what You said about 80% of C++ features... Can you give me some examples of ways I can go? Or I'm thinking about it wrong and there are no "specializations" –  smogg Apr 24 '11 at 21:05
@smogg, it sounds like you may have been focussing on web development. This may account for your impression that C++ jobs are rare compared to PHP jobs. It is very rare to use C++ to directly implement a web site. You'd be more likely to use C++ to write a web server, or a database, or an extension to PHP. There are lots of C++ jobs out there, you just won't run into many if you are looking at your run of the mill web site implementation jobs. –  Charles E. Grant Apr 24 '11 at 21:22
@smogg: I found that C++ jobs are plentiful and usually very well paid. But you need to know what you're doing, which takes years. As such C++ work is usually very different from web development and not stuff you'd give to unexperienced freelancers. Learn C++ first, then get a job as a junior C++ developer and after a couple of years experience with a solid reputation, freelancing might become a valid option. –  Alexander Battisti Apr 24 '11 at 21:49
@Alexander: Visual C++ is good, and what most people use. –  David Thornley Apr 25 '11 at 14:47

If you really want to be a professional C++ developer then read on ..

From M.Cline C++ FAQ 28.4

[Read] At least three[Books].

There are three categories of insight and knowledge in OO programming using C++. You should get a great book from each category, not an okay book that tries to do an okay job at everything. The three OO/C++ programming categories are:

C++ legality guides — what you can and can't do in C++.

C++ morality guides — what you should and shouldn't do in C++.

Programming-by-example guides — show lots of examples, normally making liberal use of the C++ standard library.

Legality guides describe all language features with roughly the same level of emphasis; morality guides focus on those language features that you will use most often in typical programming tasks. Legality guides tell you how to get a given feature past the compiler; morality guides tell you whether or not to use that feature in the first place.

share|improve this answer

To me, C++ is an investment. I worked with .NET and C# mainly, and while I liked it, it has its limitations. I always liked to play with low-level things in C++ and x86 asm.

I got a call last year for a C++ job, because they hired a .NET programmer who had to develop to low-end client machines and while he wasn't a bad programmer, he simply couldn't deliver the desired performance. I gladly took the offer and while it was painful (more painful than I imagined), I also learned a LOT. I stayed with C++ for now, and these days I enjoy every second of it.

C++ is hard, and I mean really hard. Lots of quirks and corner cases, and every month I learn something totally new about it. Of course that's probably because I'm not that experienced (about 4 years professional experience only).

It's an investment to me because I learn about a lot of things that were just given to me in the .NET world and I didn't bother to think about them. Also, since C++ is hard and unlike Java and .NET languages, not a "fashionable" choice for career, it might even benefit me financially if I get close enough to my goal of becoming a great C++ coder.

share|improve this answer

Yes we can recommend books. Accelerated C++ is concise and very good.

To expand on why it's good: it's physically thin, tells you what you need to know efficiently, is focused on C++ best practices, and essentially gives you a working understanding of C++ 98 with a minimal time investment.

share|improve this answer

As far as books go might i suggest starting with C++ Primer Plus , then Thinking in C++ and finally C++ Programming Language By Stroustroup. If you are serious with C++; you cant ignore the last book

share|improve this answer

As I have suggested earlier in the comments, I think python will be easier for you to pick up. Though python is used mainly for the web you can use it to develop desktop apps with PyQt or IronPython. The former is cross-platform and the later has a great library and IDE support.

share|improve this answer
Why –1? I was looking forward to an answer evaluating the usefulness of Python for desktop programming; is this a bad answer? –  Felix Dombek Oct 20 '11 at 17:45

You asked "Why C++?" and my response is that is a key question.

Java, C# and Python will probably make you more productive than C++.

Edit: I think most of the same problems you would address with C++, can be dealt with using Java or C#. Of course the platform and the availability of interfaces to other systems would be major considerations.

share|improve this answer
-1 since the application defines the "productivity" . C++ has avast domain. –  Wildling Apr 25 '11 at 4:24
+1 lots of developers use C/C++ only for separate type of applications - for example drivers. There is no point of using C++ everywhere. –  Heather Apr 25 '11 at 10:03
So, for which jobs I can use C++ and for which Java, Python or C#? Which language is the hardest to learn if there is answer for this question? Will one of those be easier cause of my php experience? Could You give me some applications examples for each one of this languages? And is it common practice to combine a few languages while building applications or in this world you just use one of them for each app? –  smogg Apr 25 '11 at 10:48
@broiyan Most of the problems, huh? Care to elaborate a bit further? See, what you people don't realize is that USING THE RIGHT TOOL AT THE RIGHT PLACE IS AN (programmer's) ART. Can you use Java to implement a Wi-fi driver? asm to implement a web-app?(Yeah I know they're all Turing complete, but still). C++ is a time tested language, that is often dubbed as an "expert's language". Yes, Python is productive for the relatively inexperienced, but Java? pleease. What parts of the J2EE framework(yes the bloated one with a gazillion libraries) are really productive? –  yati sagade Oct 8 '11 at 19:37
@broiyan That never justifies your statement "C#/Java will make you more productive than C++" - Just have a look out there, and tell what % of imperfect, insecure web apps do you see (mostly J2EE/.NET) and what fraction of the drivers we use daily are really broken to the extent of not being fit for use? C/C++ are the most popular languages on earth, more so in the OSS community. That hardly unifies with your productivity analysis. The OP asked "why C++?" - and not "What are the alternatives if I'm scared of C++?" Cheers :) –  yati sagade Nov 25 '11 at 7:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.