Fog Creek Software
Discussion Board

Can you learn and master C++ without knowning C

Can you learn and master C++ without knowning C ?

How long does it take to master C++
Is it a very long journey ?

Friday, May 9, 2003

You can learn and master C++ without knowing C.

Friday, May 9, 2003

Oh, and a powerful language like C++ takes weeks to learn, but a lifetime to master.  About the only language that has as many useful nooks, crannies, and neat features that are invented from the tools, not designed in is Lisp.

Friday, May 9, 2003

I think getting familiar with C before moving to C++ can't hurt. I find that a lot of folks here at Univeristy who learned an OOP language (Java or C++) before even getting familiar with C sometimes find themselves lacking something...

I think the process of learning C is a good one, learning to debug C programs, dealing with malloc / free etc. is really helpful and provides a good knowledge base for moving to C++.

Andrew Murray
Friday, May 9, 2003

C doesn't help you understand C++ because you generally avoid most of the C constructions.

But I agree with you, somewhat.  C is a nutritious part of a well-rounded programmer education.

I think what you are getting at is that a knowlege of what happens underneath a nice OOP, memory managed, typesafe, etc. glossed-over interface is useful.

What you really want, if you are learning programming, is to know a real assembley language (x86 or VAX, not something pretty like MIPS) and a real low-level language, where C is the biggest and most popular example.  I cut my teeth on extended Pascal, for the most part.

People who know this will be much more savy coders because they will understand what happens when you run out of registers, how to really screw up memory, etc.

Which never happens because professors tend to want to think about the next level of abstraction above the nitty gritty world of the CPU.

Friday, May 9, 2003

"C is a nutritious part of a well-rounded programmer education."

HA ha HA ha HA ha HA ha HA ha HA ha HA ha very clever!  I think I'm going to save that and use it later.  ;)

Friday, May 9, 2003

In a college course involving both C and C++, they taught us C++ and object-oriented concepts before C, to avoid the problem of having unlearn bad C habits when programming in C++.  Not that I am a master of C++ by any means, but I do think it is possible and perhaps desirable to learn C++ before C.

T. Norman
Friday, May 9, 2003

C++ is a superset of C. It is up to you if you want to learn the "C part" of C++ or learn C with C++.

Mastering C++ includes C as well.

Saturday, May 10, 2003

Stroustrup's opinion on learning C++ is addressed here:
Highly recommended:

Mastering C++ is covered here :-)

Saturday, May 10, 2003

"Accelerated C++" is without a doubt the best introduction to contemporary C++ programming, and it doesn't require any knowledge of C.

Being familiar with the "curly braces" family of languages will help with any language of that family but C in particular is less helpful for C++ than you might expect. Unless you're writing device drivers, you really want to avoid using C idioms and rely on C++ language features or the STL instead.

You won't be able to "master" C++ without knowing about its dark C corners, though. That's a birth defect of the language that can't be fixed. You'll have to pick a different language like Java or C# to get around that.

Chris Nahr
Saturday, May 10, 2003

From personal experience I would say you can learn to write your own code in C++, but if you want to understand the code of others you need to learn C as well.  Very few people write pure C++ code.

Ged Byrne
Monday, May 12, 2003

*  Recent Topics

*  Fog Creek Home