Saturday, May 22, 2010

Help with C++??

i am very interested in learning c++ and i am already learning it in school with the book "beginning C++ game programming by micheal dawson" but i kinda dont get it, is there some kind of website that would help me out thanx

Help with C++??
Click the link.





I really do not agree at ALL with what the first poster said, C++ is not a PURE programming language?? I'd actually like to hear why its not a "PURE" programming language, most (if not all) programming languages were build of a concept, and all languages share similarries and have few differences. "Mastering C/C++ is intimately coupled with annoying details, such as understanding the hardware underneath.", I don't really understand this statement either seeing as C++ is a higher level language and can be re-complied to a different operaiting system, C++ is NOT directly hardware specific like assembly.





Oh, and one more thing, Java has similar (if not exactly the same) syntax as Java, and somewhat of similar syntax as C++. C++ is a fine language to learn, and with time it will teach you important concepts, including what memory leaks are, why exactly C++ is an object oriented language, polymorphism, inheratance, data strucutres, and MOST importantly algorthim design.





One last thing I do not agree with the first poster..."really need every last drop of speed from your CPU, consider learning something easier to start with", C++ is a higher level language, meaning it needs to be complied down still (it doesnt create a 1 to 1 relationship with your code like assembly does), if you want truly fast programs and to squeeze every ounce out of your program, that is an ideal use for assembly, which is hardware specific.





More importantly than anything though, you need to LEARN the concepts of programming, not just a language. Good luck, and welcome to the world of programming.
Reply:why are you so interested in c++? it's one of the trickiest languages to learn, and can be a sprawling shanty-town of failed programming concepts and legacy ideas about programming. It's not a pure programming language, having taken many evloutions to get where it is today. Mastering C/C++ is intimately coupled with annoying details, such as understanding the hardware underneath. Unless you want to write some realtime system (such as low latency audio) or really need every last drop of speed from your CPU, consider learning something easier to start with. Getting a decent grounding in Object Oriented programming is far more essential than learning any particular language. Once you understand OO (it takes weeks/months, not days), you'll find that most modern languages will seem much easier to understand. Maybe not the answer you're looking for, but if you don't get it, perhaps you've thrown yourself in too deep. Get to grips with Java/C# and then you'll be in a much better position to understand C++.





Later on, Spender said...





In answer to some of the criticisms of the above... C++ suffers from the problem of being all things to all people. At it's core, it's a superset of C, which maps almost directly into assembly language. This is why C is the weapon of choice when programming hardware. In order to squeeze the best performance out of C++, it is vitally important to completely understand the way that storage maps to the underlying architecture. Without this kind of knowlege, it's very easy to write code that is suboptimal in terms of performance. My primary gripe with C++ is its age. Programming is a dynamic scene, with yesterday's holy grail quickly becoming this year's wtf. C++ predates some of the most prominent books in software design of recent years (Gang of four, anyone?) and you have to take a somewhat long winded approach to design patterns that are now the defacto standard in more modern programming languages. Without some sort of mentor, it is incredibly difficult to choose the right path through the huge volume of advice on offer... some of which would be considered harmful when compared against newer programming practices.


The sprawling APIs mean that there are often 100 different ways to skin the cat... often you'll find that 80 of those ways represent the "old" way, but the language/API features persist in order to cater for legacy code written in a very different era of software design.


Sure... academically, C++ is an interesting language offering you more than a few ways to shoot yourself in the foot and plenty of insight into CS, but in the real world, most programmers at "school" grade would gain better benefit from learning about OO, Design patterns and the like without trying to figure out why the program works in the debugger but crashes horribly when released. Once you have a grasp of these far more important concepts, you'll find the techniques you learn will guide you through the fog of C++ far better than C++ will guide you through the fog of sound programming practice.
Reply:Continue to learn C++ with the book. Type in the examples (no cut and paste), you'll learn and retain more. Play with the example code and examine the results. It will give you confidence. That's how I learned C 23 years ago and C++ 16 years ago. That being said, I'd like to invite anyone interested in getting an intro to C++ game programming with my new blog (link below). I published a few games about 14 years ago and it continues to be a hobby. I don't have a multi-million dollar budget and a production team, so it will probably always be a hobby. But, it's fun and educational.
Reply:I don't really agree with spender about C++. I like it. I think that it's a fine language to learn. It's usually the language that's taught in beginning programming classes.


No comments:

Post a Comment