Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need people's suggestion, I am a .net programmer, works well with C#, but lately, I have been working on some open source projects written in c/c++, and I have started regreting not to have done extra work on the C and C++ I was taught in school, I want to go down the line and learn either of C or C++, which one should I focus and put my energy on?

OP's answer:
Thanks all for your reply, this is what I will do, I will learn C language enough to be able to read and understand any code in it, I will then learn C++ thoroughly, since I am an OO programmer and C++ is an object oriented language,
once again thanks all for your time.
Posted
Updated 16-Dec-11 13:18pm
v2
Comments
Prashant Srivastava LKO 16-Dec-11 6:41am    
My opinion is with C do work in c if u able to clear c then u can easily clear C++

Forget C, you already know it from C# - there is lots of commonality. Go for C++ as it will be far more useful in the long run.
 
Share this answer
 
Comments
Albert Holguin 16-Dec-11 9:47am    
I wouldn't say forget about it... but C++ would probably be more useful in the long run... it's good to be diverse.
Richard MacCutchan 16-Dec-11 12:49pm    
Hence my comment, and if you learn C++ you will learn C as part of the process.
Knowing C#, apart from the concepts of pointers you already know most of C. But you will find that C is lacking a lot of things you are used to from C#. Therefore, even though it's more complex, you may actually have an easier time learning C++. It's true that (unmanaged) C++ cannot use the .NET framework, but there are powerful C++ libraries such as STL and boost that easily make up for that. OTOH you will have a much harder time finding similarly powerful libraries for C.
 
Share this answer
 
My suggestion is you can learn C++ because you already know C# so you might be aware of basic concepts still there are lot of real time projects done using VC++ which is similar to C++ ..
 
Share this answer
 
Real programmers use C.
 
Share this answer
 
Comments
Stefan_Lang 16-Dec-11 7:21am    
As in CPallini? :-)
CPallini 16-Dec-11 7:35am    
:-D
Many folks say: "don't learn C before C++, because then you will do ugly C-like C++ programming". I think the opposite. You need to know very well C if you're going to learn the C++ language. Moreover, the libraries are not the language, they are simply built on the top of it: you need to know first the former and the the latters.
Of course this is my own, personal opinion.
:-)
Albert Holguin 16-Dec-11 9:45am    
I agree with you too... I think C is rather straight-forward to learn... and C++ just takes that to another level, but C is still a great foundation and after all these years, a solid performer.
Philippe Mori 16-Dec-11 19:46pm    
Humm... I do not agree. Many programmer that come from a C background still mainly write code in C (not object oriented) and just uses C++ as a better C.
CPallini 17-Dec-11 9:29am    
That's the main objection, I know. However:
(1) Using C++ as better C is legitimate (since OOP is not always required).
(2) Many (only) C++ developers are lost, for instance, without their friendly string containers (like CString).
Unless you learn C, there is no C++, C++ is nothing but super set of C. C++ is big and complex language. Learning C makes it bit simpler and you can understand intricacies easily.

Like its easier to learn Class when you know structure. Unless you know how to write function how can you imagine about function overloading.

So start with C.
 
Share this answer
 
Comments
BrainlessLabs.com 18-Dec-11 12:28pm    
I again disagree that you have to learn C to learn C++. Why I suggested him about learning C first is cause he already knows C#, so has the concept of objects, etc. So learning C will give him more insight into procedural programing. If he can learn C# first, without knowing C/C++ he will not need C to learn C++.
[no name] 23-Dec-11 13:16pm    
Shakti Misra is absolutely right! There is absolutely no need to learn first a proc language. Better start with oop!
Regards
Learn C and migrate to C++. But focus on data-structures and algorithms. I would also suggest first learning Python if you are new to programing.
 
Share this answer
 
Comments
Balakrishnan Dhinakaran 16-Dec-11 23:30pm    
my vote 5 for the acceptance of your solution
C is a subset of C++, so in the end it does not matter much. Begin wih C, where you will find many familiar concepts. The important part will be to get some experience with using pointers and managing memory. After that you can move on to C++ and look at object orientation. Some things may look very familiar from C#, but often you must take a close look. Multiple inheritance is allowed in C++, and also there are things like protected or private inheritance. Templates may look like C# generics, but there are some differences. And you must learn how to use destructors (as opposed to finalizers or IDispose), again to manage memory or other resources).
 
Share this answer
 
v2
I think you should learn Cobol - It starts with a 'C'.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900