Jump to content
  • Advertisement
Sign in to follow this  
kaktusas2598

Topics to master in C++ before advandce to next level

This topic is 2141 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

Okay, I came back to programming after year pause. My language of choise was and is C++ and I'm relearning it now. My question is really silly. So here it goes: Is there a list of topics in programming language (C++) I need to know before advancing into creating more sophisticated applications like games and so on. I mean topics like functions, pointers and etc. Can somebody give me this list. I'm looking forward to dive into things like Qt, SDL (actually knew it in past, but forgot) and maybe OpenGL.

Share this post


Link to post
Share on other sites
Advertisement

And what about C superset of C++? C standart library and etc.?

They diverged shortly after C++ was created, the language is not a superset.

Standard C89 did not compile in the nascent C++ compilers of the era, and they have diverged further since. Non-trivial C programs do not compile in a C++ compiler, nor do non-trivial C++ programs get through C compilers.


That said:

You don't need to bother with the C standard library, although nothing is stopping you if you want to learn it.

Share this post


Link to post
Share on other sites
The best to REALLY learn a language is to just dive in, study other people's code (check out some open source game engines, or even games), and start programmin your own game. Even if you have to start from a "Hello, World" example and build games from there, JUST WRITE GAMES ( which also means you are writing code). IMHO, game programming is one of the best ways to learn various programming paradigms in general. Programming a complete (albeit simple) game engine (don't start off there) will make you use many patterns in design which can be translated to ANY language, but more importantly you will gain an understanding about how these patterns are designed using the language of your choice (in your case, C++). I would also add http://www.cplusplus.com/ is a great resource for exploring C++ language features as well as various STL and C standard libraries. Also, if you are really wanting to target C++, I would suggest learning and using templates early on as they are a very powerful feature of C++ which C does not have. Many libraries (in particular Boost and QT) will take advantage of templates in their designs (STL stands for Standard Template Library, and templates are the basis behind their design, so even if you are just using templates and not designing class or function templates yourself, it still comes in handy to know what they do and how they work).

Also as a side note, OpenGL's interface and API is in C, not C++. Although C++ may not be a strict superset of C, they play very well together, and you can certainly call C library functions from within your own C++ code.

Share this post


Link to post
Share on other sites
I think a majority of it actually has to do with learning how to program, skills that you can take from 1 language into another, but with regards to C++, you will want to learn and udnerstand

STL - Its a big part of C++ (or you could be brave and do it all alone); containers, iterators, strings, regular expressions, streams
Memory Management (including Smart Pointers)
C++11 features (move semantics, use of lambda expressions, Initializer lists ... I can't even remember them all anymore lol)
Templates
Multithreading

And just work on building up your design, theres alot of different paradigms out there

Share this post


Link to post
Share on other sites
Something that is often overlooked by people learning to program is the importance of design patterns. Design patterns aren't about how to write code in a particular language but rather how to structure code and make it as flexible and robust as possible.

Design Patterns: Elements of Reusable Object-Oriented Software is a great place to start.

This one is quite advanced but something I would recommend C++ programmers to eventually work towards understanding - Modern C++ Design. It makes heavy use of templates.

These are just two examples of great books on the topic. I can't stress enough how important software design is for programmers. Simply learning how to write code might allow you to hack things together, but projects that have a high level of complexity (and games certainly fits in this category) are almost impossible to maintain if not designed properly.

It was years before I was made aware of design patterns, after which my programming ability improved dramatically.

Share this post


Link to post
Share on other sites
You should read and understand everything in the C++ FAQ Lite, and for revision and more esoteric topics, read Guru of the Week.


Something that is often overlooked by people learning to program is the importance of design patterns. Design patterns aren't about how to write code in a particular language but rather how to structure code and make it as flexible and robust as possible.
I'd say they're more about just giving names to common patterns that seem to be re-invented over and over again, to make conversing with other programmers and explaining your code easier (as well as refining these common patterns down to their core idea). They shouldn't be used as a "play book" of designs, though yes, they can be a good learning resource if you've never seen a certain pattern used before. Edited by Hodgman

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!