Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C C# C#4.0
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 16-Dec-11 0:34am
Edited 16-Dec-11 13:18pm
v2
Comments
Prashant Srivastava LKO at 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++
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
Albert Holguin at 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 at 16-Dec-11 12:49pm
   
Hence my comment, and if you learn C++ you will learn C as part of the process.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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++ ..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Real programmers use C.
  Permalink  
Comments
Stefan_Lang at 16-Dec-11 7:21am
   
As in CPallini? :-)
CPallini at 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 at 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 at 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 at 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).
Shakti Misra at 18-Dec-11 9:53am
   
Well I disagree. C++ is not a better C, it just retains backward compatibility with C. C and C++ are different languages. C influenced C++, but after CFront I do not agree that C++ is C with classess. (For example try functional programing with C??)
C++ developers should learn to use STL at least, that makes their life easier.
I mostly would suggest people learn the programing techniques first rather than a programing language. Be it C/C++/Java. A language is just a tool to communicate with the machine in a particular fashion and get your work done.
CPallini at 18-Dec-11 10:45am
   
I never said C++ is a better C, I said instead: some programmers use C++ as better C and that's fine (legitimate) to me: if you don't need objects, after all, why should you use OOP?
Shakti Misra at 18-Dec-11 12:25pm
   
I agree. And I also agree OOP is not a solution to everything. What I meant to say is people should not see C++ a better C. If they think this, then they try to use different models. Modeling should be simpler, and according to problem at hand. OOP should not be forced.
CPallini at 18-Dec-11 12:32pm
   
I fully agree and, of course, share your point of you: knowing C++ means understanding its strong support to OOP.
tambores63 at 16-Dec-11 16:56pm
   
Maybe there is a small diff oop (C++) vs. proc (C) ? and that is a basic difference...maybe...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 10

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.
  Permalink  
Comments
Shakti Misra at 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++.
tambores63 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

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.
  Permalink  
Comments
Balakrishnan Dhinakaran at 16-Dec-11 23:30pm
   
my vote 5 for the acceptance of your solution
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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).
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

I think you should learn Cobol - It starts with a 'C'.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 420
1 CHill60 410
2 Sergey Alexandrovich Kryukov 384
3 PIEBALDconsult 235
4 BillWoodruff 190


Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 16 Dec 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100