Hello CodeCall,
I have recently begun programing in C. I purchased a VTC video tutorial to help me out along the way. Well, to make a long story short, i've gathered myself that C++ is more useful than C.
By continuing to learn c, in the hopes that one day I may 'master' the language, would I be able to easily 'upgrade' to c++ without much difficulty? I am aware that some statements are different, such as instead of printf in c, in c++ it is cout, but how different is the language from C?
I apologize for my ignorance, I'm very new to programming. To be honest, its only been a few days (watching anti-trust was my inspiration).
I appreciate all comments and feedback, thank you!
Jeff
Is all lost?
Started by TechieJeff, Jan 09 2010 11:13 PM
2 replies to this topic
#1
Posted 09 January 2010 - 11:13 PM
|
|
|
#2
Posted 09 January 2010 - 11:47 PM
I am in no way an expert on either language, but these are my reflections:
The biggest difference is not in the syntax, but it is that c is not object oriented, c++ is. So, it's very important to understand what an 'object' is, how to treat objects, e.t.c. You basicly have to think different.
That said, my experience is that c++ accept c-style in a widely manner (for example, using "printf" in c++ is completely legal, taken that the appropriate header is included.) It's easy to move from c to c++, once you fully understand the idea behind OOP.
The biggest difference is not in the syntax, but it is that c is not object oriented, c++ is. So, it's very important to understand what an 'object' is, how to treat objects, e.t.c. You basicly have to think different.
That said, my experience is that c++ accept c-style in a widely manner (for example, using "printf" in c++ is completely legal, taken that the appropriate header is included.) It's easy to move from c to c++, once you fully understand the idea behind OOP.
________________________________________________
"I'm not young enough to know everything." - Oscar Wilde
"I'm not young enough to know everything." - Oscar Wilde
#3
Posted 10 January 2010 - 06:22 AM
Almost all C programs are also valid C++ programs (with poor style, of course). C++ is a more flexible language, but that comes with a certain amount of additional complexity. Most operating systems are programmed in C, as are most drivers (along with assembly). Learning C will not be a wasted effort. I prefer C++, myself. That's primarily a style thing, and the fact that I like OOP coding.


Sign In
Create Account

Back to top









