devWhiz Posted June 26, 2012 Share Posted June 26, 2012 Should I learn C first or should I just start with C++? Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/ Share on other sites More sharing options...
requinix Posted June 26, 2012 Share Posted June 26, 2012 I say C first because it forces you to learn things from the ground up, but you don't have to become a professional with it - enough to, say, understand the PHP source code. C++ abstracts out some things that are actually important to know and understand. Things that not nearly enough programmers nowadays know about. Also, get off my lawn. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1357252 Share on other sites More sharing options...
devWhiz Posted June 27, 2012 Author Share Posted June 27, 2012 Get off your lawn? Lol.. 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! Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1357325 Share on other sites More sharing options...
requinix Posted June 27, 2012 Share Posted June 27, 2012 Not really - I don't learn with books or tutorials. Any series you've tried before and liked? Head First? O'Reilly? Mosey on over to a bookstore, skim through a few books they have, and see what's out there. There's bound to be one or two that will work well for you. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1357341 Share on other sites More sharing options...
devWhiz Posted June 27, 2012 Author Share Posted June 27, 2012 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 Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1357465 Share on other sites More sharing options...
annaharris Posted July 5, 2012 Share Posted July 5, 2012 In my opinion, you should learn first of all C and after that C++. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1359289 Share on other sites More sharing options...
Hall of Famer Posted July 7, 2012 Share Posted July 7, 2012 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. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1359842 Share on other sites More sharing options...
KevinM1 Posted July 7, 2012 Share Posted July 7, 2012 @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. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1359891 Share on other sites More sharing options...
yoursurrogategod Posted August 1, 2012 Share Posted August 1, 2012 @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. 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++ . 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.cprogramming.com/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. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1366046 Share on other sites More sharing options...
yoursurrogategod Posted August 1, 2012 Share Posted August 1, 2012 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. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1366056 Share on other sites More sharing options...
XP1 Posted October 21, 2012 Share Posted October 21, 2012 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 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. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1386700 Share on other sites More sharing options...
cpd Posted January 15, 2013 Share Posted January 15, 2013 I couldn't agree more with KevinM1. Which one you choose to learn (first) is completely dependent on your goal. There's no reason why you can't learn C++ first; It inherits everything from C. People seem to think C -> C++ because its a "step up" but in reality its not, its two different languages one being a superset of the other. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1405790 Share on other sites More sharing options...
Zane Posted June 19, 2013 Share Posted June 19, 2013 The biggest question is time. Do you have the time to learn C? If you're just an unemployed teenager who like programming, I would take the free time that you have an learn C. In short, it will not hurt you to know C As Kevin mentioned earlier though, it all depends on your needs. If you're just bored, I would go with C. if you're looking for a language that you can create a certain application with, learn C++ or C# or Java... Think of it like a vehicle. C++ would be your ability to add things to the car. New engine, new stereo system, new alternator, new upholstery , etcetera, etcetera, etcetera... Knowing C would be your ability to tweak of fix these things without even needing a "new" thing. For instance, say your alternator goes but you just happen to know exactly how to take it apart, change the brushes, make new brushes, whatever. Battery goes out and you know exactly which chemicals to get to renovate it. If you get into a fender bender and part of the body of your car is ripped off, leaving a gaping whole, then you would how to weld some old metal to the point that it looks brand new. Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1436867 Share on other sites More sharing options...
requinix Posted June 19, 2013 Share Posted June 19, 2013 (cough thread will be one year old next week) Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1436900 Share on other sites More sharing options...
Zane Posted June 20, 2013 Share Posted June 20, 2013 ah.. damnit, what the fuck? Link to comment https://forums.phpfreaks.com/topic/264839-learning-c-or-c-which-first/#findComment-1437016 Share on other sites More sharing options...
Recommended Posts