Jump to content
  • Advertisement
Sign in to follow this  
shadowstep00

C++ As First Language

This topic is 2261 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok guys i have been hearing a lot about how bad C++ is as a first language. Well before i had read this topic here:http://www.gamefromscratch.com/post/2011/08/04/I-want-to-be-a-game-developer.aspx

I had already started learning C++ with this book C++ Primer Plus and went ahead till the second chapter with no real problems. The book has learned me so far how to creat functions, some statements and explained about the prepocessor directives,directives and very little about classes and objects. Well i had no prior experience from any other programming language but still i think i got how things work till now.

So my final question is.. Is really C++ that hard for a begginer? is it impossible to learn C++ as first language? or it just requires some more dedication than other languages? or maybe i just havent got to the difficult things yet....


PS. After i read that article that i mentioned before i started learning C# but it really didint got my attention so much and also the books where not traditional like those of C++ which first learn you how to write "hello world" , variables ect... Most of C# books empasize fist on Visual Studio and dont get you to the basics of the language first. I would like to work on a book that first learns me how to write and then introduce me to Visual Studio.

Sorry for my English.

Share this post


Link to post
Share on other sites
Advertisement
Hi ShadowStep.

Many of the worst issues will be avoided if you write modern proper C++ rather than the bastardized mix between C and C++ that some online tutorials teach

A big +1 on that one Simon. Besides C is a lot better for understanding basic language syntax (functions, conditional instructions, loop instructions, basic code layout, etc.). C++ adds a lot more to that. Edited by MoroS84

Share this post


Link to post
Share on other sites
Yes C++ as a first language usually isn't that great of an idea. There are some things in C++ that are just best learned through another language. I learned Python first and I don't regret it. C++ is still my favorite but only after I had a good hold on the other language. (Python, .net, Java)

Share this post


Link to post
Share on other sites

Is really C++ that hard for a begginer?


'hard' isn't really the proper description. It's not hard to learn so much as it's hard to learn right. There's a lot of little gotchas that aren't obvious, and things that are correct yet less optimal than other things.

Worse yet, C++ requires a lot of overhead to make sure you're doing things right. That overhead would be better spent on learning to program. Since learning to program can be done with any language really, it's better for you to work with one that requires less overhead and has less gotchas.


I would like to work on a book that first learns me how to write and then introduce me to Visual Studio.


This is (arguably) unwise. Visual Studio is what you see first, and it's important to make sure that you can compile and run your code before giving you too much code to write (since you should be writing code as you work through the book).

Share this post


Link to post
Share on other sites
If you are enjoying it, and not feeling disuaded or overwhelemed, then go for it. Programming is not an easy discipline no matter the language (for most people, anyway), even failures and false starts can be a learning experience - the only real danger is becomming discouraged and quitting. With C++, there is probably a higher "drop-out rate" due to added complexity and annoyances specific to that language.

Heck, I consider myself somewhat experienced, and these days I only use C++ when I have to (mostly this coincides with someone is paying me to) - it's not a particular easy and smooth experience for anybody, compared to many other languages (note that for many people, easy =/= enjoyable, however).

Share this post


Link to post
Share on other sites
First of all, I thank you for all your answers they really help me out.

I wanna tell you that this book that I am reading C++ Primer Plus http://www.amazon.co...&pf_rd_i=507846
is updated to the

[color=#000000][font=verdana, arial, helvetica, sans-serif]C++11 standard[/font] cause it was realeased 2011 and in the description says that includes [color=#000000][font=verdana, arial, helvetica, sans-serif][size=1]

C++11 standard.

Apart from that it also does not mix the C language with C++ but it does[/font]

[background=rgb(250, 251, 252)] [/background]

mentions some things that you can skip(i skip them) for those who have come from C to make it easier for them.In addition i think that if i get each chapter right and do all the exercises correctly( and some similar more of my own) i should be on the right way.

I think from what you have mentioned here is that the most difficult thing about C++ is the freedom that it gives you in terms of how you can write a program in too many different ways.

Other than that what should i watch out? Where i might be tricked? So to be Extra alarmed in that chase.... Edited by shadowstep00

Share this post


Link to post
Share on other sites
A good indicator of a bad way to teach C++ could be if you stumble across pure pointers or the keyword "new" in code example quite early (like earlier than halfway into the book). This *could* mean the book might still use some old fashioned (and thus error-prone and dangerous) ways to achieve certain things.
Even pure arrays might be an indicator of such a problem.

I don't know this book, but I don't think a C++ book can easily be adopted to cover C++11, because a lot of the basic workings of the language have been improved substantially, thus rendering section relying on the older standard obsolete.

Maybe somebody knows this book and can give a more facts based assessment of it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!