Hi guys, I have a really puzzling question... I really want to start programming more. (Programming will be more of a hobby than a job for me.) The problem is that I can't figure out which language would be better to learn...C or C++

I want a language that:

* I can do system programming with
* I can build a compiler with
* I can use to fool around with the Linux Kernel
* I can program my own Linux distro in
* I can start an OS from scratch with
* I can program nice GUIs with
* Is pretty easy to learn (ie. not Assembly :eek: )
* and that preferably has a lot of resources for learning...

I couldn't find any answers after hours on different search engines, so I'd really appreciate any input. It's really frustrating when even Google can't give you any answers...

Thanks for any suggestions you might have. :)

Recommended Answers

All 5 Replies

Though other people might have different views on this, here is what I personally think :

* I can do system programming with
* I can build a compiler with
* I can use to fool around with the Linux Kernel
* I can program my own Linux distro in
* I can start an OS from scratch with

That would be C, though C++ has started to creep in this area considering the increasing complexity of these programs. Core linux kernel written in C. Most parts of Python and Perl are implemented in C. Core windows kernel again made in C.

* I can program nice GUIs with
* Is pretty easy to learn (ie. not Assembly )
* and that preferably has a lot of resources for learning...

That would be C++ . Most GUI libraries I have seen have been implemented in C++ and for C++. Lot of C++ resources on the internet and is pretty easy to learn considering the added abstraction and STL incorporation in C++ standards.

Oh I btw, don't let someone kid you into believing C is dead -- because it isn't ( the same goes with Lisp ).

Thanks so much, ~S.O.S~. I really appreciate it, that really cleared things up for me :) . It seems like they compliment eachother nicely...one seems to pick up where the other leaves off.

Do you have any suggestions as to which one should be learned first?

...oh, and I know that languages tend to evolve over time, have they (C/C++) changed a lot? Should I look for the newer books for both of them, or does it matter?

Thanks... :cheesy:

C++, I have heard many say, is a functional superset of C, so most of what you learn in C++ is very much applicable to C.

Though if you had started with C, the ad hoc style of coding which ensues when a beginner normally starts programming would have been difficult to unlearn, resulting you in writing C code using C++. But if you start off with C++, no such issues ( you can't write C++ code as it is in C). Starting off with C++ would be a good idea.

And btw, the kind of books you choose play an important role in the way you develop your programming skills and knowledge base, so be picky and choose the best after thorough research.

Some really good books by Mr. Dave Sinkula are mentioned here.

Thanks so much, ~S.O.S~!!! It's all crystal clear! I'll get right to finding the best C++ books and sources out there. If I find anything really good, I'll be sure to post about it---good books are hard to find these days...

Thanks again!

Hi guys, I have a really puzzling question... I really want to start programming more. (Programming will be more of a hobby than a job for me.) The problem is that I can't figure out which language would be better to learn...C or C++

Both! :)

I want a language that:

* I can do system programming with
* I can build a compiler with

Both languages are designed with system programming in mind. C++ will make building a compiler easier because of the more extensive feature set though. ;)

* I can use to fool around with the Linux Kernel

The Linux kernel is written in C. So are most Linux tools and applications. If you want to hack Linux, you'd better know C. ;)

* I can program my own Linux distro in
* I can start an OS from scratch with

Both will work for that, but if you want to write your own OS, let it be known that you will be working wtih assembly.

* I can program nice GUIs with

Ehh, C++ probably makes it easier, but I'm not a fan of GUI programming in either. There are better tools for user interfaces than C or C++.

* Is pretty easy to learn (ie. not Assembly :eek: )

C is easier to learn because it's a simpler language. Both are hard to master. And assembly isn't as bad as you think. I'd say assembly is easier to learn than C++ but probably not C. And it's easier to master than both. ;)

* and that preferably has a lot of resources for learning...

Yes. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.