Learning C or C++, which first?
#1
Posted 26 June 2012 - 05:20 PM
#2
Posted 26 June 2012 - 05:32 PM
#3
Posted 27 June 2012 - 12:41 AM
Are you able to suggest a good book to start with? I know how to make some simple math programs and such in C++ already.. I have a little bit of knowledge on the basics of C++..
I started programming 3 years ago, Started with PHP, now I can do anything I need done with that.. but if you have any suggestions or could point me in the right direction? Thanks!
#4
Posted 27 June 2012 - 03:09 AM
#5
Posted 27 June 2012 - 12:30 PM
#6
Posted 05 July 2012 - 07:45 AM
#7
Posted 07 July 2012 - 03:31 AM
Welcome to the world of OOPHP! In a perfect script, everything is an object. You cannot be perfect, but you can approach as close as can.

#8
Posted 07 July 2012 - 09:16 AM
@OP: The real question is what do you want to do with the language(s)? C is generally used for close-to-the-metal programming where speed and efficiency are paramount. The linux kernel is written in C, for example. C++ is generally used for mainstream apps.

My rarely updated, incredibly rambing, questionably informative blog || Don't go to w3schools || Using 'global' is a sign of doing it wrong
#9
Posted 11 July 2012 - 06:06 AM
#10
Posted 01 August 2012 - 01:30 PM
I have to disagree with this. Having worked with both, the line between the two is blurring. When it comes to performance, C++ is not that far away from C (but this comparison is absurd since it all depends on the assembler that the compiler is generating). Yes, C is used more for kernel-level code, but its domain is quickly shrinking and becoming less prevalent to just that area. Even in the operating system sphere, C++ is showing in areas that were previously written in C. And yes, you can write a kernel in C++@Hall of Famer: again, OOP is not inherently superior than procedural.
@OP: The real question is what do you want to do with the language(s)? C is generally used for close-to-the-metal programming where speed and efficiency are paramount. The linux kernel is written in C, for example. C++ is generally used for mainstream apps.
Also, it depends on your notion of what it means for mainstream apps.
OP, learn C++. The hardest part about C is the concept of pointers, something that C++ already has. You will have more room to learn new stuff. Here are a few tutorials:
- http://www.cplusplus.com/doc/tutorial/
- http://www.cprogramm...m/tutorial.html
Go through those before you bother with buying a book (cheaper). Honestly, just dive in, all of the other pieces will fall into place.
Lastly, the common mistake newbies make is that they focus on the language and what it -- in theory -- is supposed to do. If you want to gain a certain mastery (or depending on the direction you would like to head in), make sure to learn some assembler and how the operating system that you're writing against is creating this code.
#11
Posted 01 August 2012 - 01:46 PM
Id say you should just learn C++ without undergoing C training at all. C++ is an object-oriented programming language based on C, the syntax is similar but C++ offers much more advanced features for objects. Moreover, C++ encourages programming in the OO way which can be a problem for hardcore C programmers. If you are so used to coding an application in a pure procedural language, the switch to OOP will be more difficult than it otherwise should be. For absolute beginners procedural programming may be an easier starting point, but it is not really a problem for C++ as it also supports C's syntax. Just make sure you move into OOP right after getting used to basic stuff such as Conditionals, Loops and Functions.
Most people who are so pro-C and anti-C++ tend to be unwilling to learn something new (yes, some of the older developers tend to be like this at times). Developing code is about grasping new concepts all the time, so unless you're just unwilling to learn something new, this is a non-concern.
#12
Posted 14 October 2012 - 05:57 AM
#13
Posted 21 October 2012 - 04:46 AM
Head First C was very fun and easy to read. I liked it. Head First C++ doesn't exist. I hope to read Head First C++ when it comes out.Ahh, I forgot about Headfirst .. I own Headfirst Java - Reading that book was a decent experience.. They make it easier to comprehend.. I'm going to look into Headfirst C++ and C. I've got some of the basics of C++ down. I'm self taught in PHP, I've mastered pretty much every aspect of that language.. I don't know why it has taken me 3 years to even initiate trying to learn C++.. In the beginning it was intimidating I guess.. lol now Its not bad at all
#14
Posted 15 January 2013 - 03:38 AM
"One of my most productive days was throwing away 1000 lines of code."
#15
Posted 18 April 2013 - 07:37 AM
First, you should start with C then after you can move on C++.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












