I'm currently learning C++ as a hobby, but would love to find a programming job one day. I often see programming jobs that require you to have a background in C/C++.
Should I learn C before I learn C++? How difficult would it be to learn C later on after having programmed in C++ for a while?
Should I learn C before I learn C++?
Most programs like to teach C before C++. However, there is no reason why you shouldn't start with C++. One of the things people who start with C have a problem with is switching their thinking to an object oriented approach. I think if you start with C++ you can avoid this problem and I think going from C++ to C would actually be easier than going from C to C++.
If you go this route, make sure that whatever method you decide to use to learn, whether it be book or a course you enroll in or whatever, doesn't expect you to know C first. If they are teaching from an approach where they are building on C you may find yourself becoming frustrated.
Also I dissagree with Keena: I think it would be more like learning to ride a bike before learning to build it.
Reply:c lacks inheritance,polymorphism,classes, objects ,ect which is present in c++.........
ur idea would be like tryin to drive a bike b4 learning cycle.....lol......
u can , but am afraid it would be hard....
Reply:You should learn C++ first.
You will learn object oriented programming and you will have the opportunity to learn better practices, such as RAII. Also, the standard library in C++ does a lot more than the C standard library. You don't have to learn as much raw material before you can write a useful program. Most importantly, the C++ library does a lot of memory management for you (via container classes). Memory management is the most difficult part of C. Delaying that will get you up and running much faster.
In addition, raw C is not used much now, especially on desktop environments. It is used in specialized environments such as kernel drivers and embedded systems but stuff like that would be well in the future.
Once you know one language well, it is relatively easy to learn another. Going from C++ to C, you might miss the stuff you had, but it's not hard. You'll have to learn manual memory management, but it's not too bad once you have background.
Some of the best C++ learning books are:
C++ Primer 3rd ed, Stanley Lippman
The Complete C++ Training Course, Deitel %26amp; Deitel
You Can Do It- A beginner's introduction to Computer Programming!, Francis Glassborow
Reply:Just learn C++ because C is becoming more and more obsolete. C++ is one of the most prominently used languages out there and the language of choice in video games. C++ is a souped-up version of C, so learning C is pointless.
Reply:Yes it's always better to learn C first and I will explain why.
C is a very general purpose programming language. It is used to solve a wide range of programming problems. C++ takes it to another level by making object oriented programming a LOT easier while using the standard library provided by C. C does have advantages too such as a wide array of superior compilers to choose from.
You will not find C difficult after learning C++ because I learnt C++ 4 years before I even touched a C book. Personally, dealing with pointers in C was a pain in the neck whether you do it first or not you will have to do it at some point.
It's best to know both languages but just remember that 90%+ of all the programs out there can be written in either language.
Reply:C++ is EXTREMELY hard to learn. That is the reason why microsoft has invented C#. If you want to do something beneficial for your career learn C# instead. Ruby is also getting into demand %26amp; very user friendly. Forget C %26amp; C++ it is the PAST. Those 2 languages are use mostly in the research field but will dissapear.
Reply:I would lean towards C++. If you learn C++, then you are learning C with more features. C++ is just an extension of C, and you will probably find more job opportunities with C++.
Personally, I learned C first and C++ was extremely simple to learn afterwards. It would probably be the same if I knew C++ then tried to learn C.
Reply:I would suggest do your c++ first, because its a bit easier than C, when it comes to syntex of the commands that you need to write.
Once the logic of the code is clear to you.
You would find C quite easy to follow ...
The logic for both the land is the same but C is a bit more powerful as it gives you a bit more freedom with the assembly lang and hardware( but again slighly tougher than C++)...
my suggestion.. complete C++ and then C would be a cake walk for you.
Reply:in my opinion, you should learn C before C++
why? because it is easier and not that much "cryptic"
to understand than C++.. ^^
learn as much as you can in C, and when the time
that you're feeling that something (eg functionality, or
you cant code it easier) is missing while using C,
then its "time" for you to start to learn C++.. ^_^v
if you learn first C before C++, it is like
relearning C with some added functions
and another way to code a C program..
but the other way isn't.. if you first learnt C++ then C,
you may expect some functions to exists also
in C, which is often not.. why? because C is impossible
to be "backward" compatible with C++..
i hope you got my point.. peace out.. ^_^v
Reply:Ideally, you should learn C before C++ but you should be learning both at the same time.
Just to get a comparison between doing input/output statements and features in each language.
Or you can learn C then C++ then C# to see the differences in each language and the advantages of using each language.
It shouldn't be difficult to learn C after learning C++ but just having to remember that you cannot use 'class' in C and reference declarations.
In memory management, C uses malloc/free, C++ uses new/delete.
You don't need to cast a void* to pointer* where pointer is any type in C where as C++ requires you to do it.
C++ flags error where they are warnings in C.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment