Topics to master in C++ before advandce to next level
#1 Members - Reputation: 498
Posted 08 August 2012 - 01:32 PM
Honore de Balzac
#2 Members - Reputation: 3283
Posted 08 August 2012 - 01:43 PM
Well, that's not really a helpful answer, but you want to pick up as much as you can, beyond going into the esoteric stuff ( which C++ is full of ).
To start you should master:
variables and scope ( learn the difference between a local and global )
program flow ( if, while, for )
console and string ( string/iostream )
Next you should conquer:
functions
passing by value vs reference
splitting code into multiple files ( header, cpp, include guards/pragma once )
Then move on to:
objects/classes
inheritence
member functions/variables
Then:
smart pointers
STL containers ( start with vector )
Then:
Dealing with the linker, consume a 3rd party library like SFML or SDL
At this point you are probably ready. Optionally look into new/delete/manual memory management at this point. You should probably look into exception handling at this point as well.
I have a tutorial linked in my sig that might help you, once you have completed at least the first part of this list.
Edited by Serapth, 08 August 2012 - 01:46 PM.
#4 Moderators - Reputation: 7624
Posted 08 August 2012 - 02:25 PM
They diverged shortly after C++ was created, the language is not a superset.And what about C superset of C++? C standart library and etc.?
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.
#6 Members - Reputation: 157
Posted 08 August 2012 - 03:13 PM
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.
#7 Members - Reputation: 329
Posted 08 August 2012 - 04:34 PM
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
#8 Members - Reputation: 140
Posted 08 August 2012 - 04:59 PM
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.
#9 Members - Reputation: 127
Posted 09 August 2012 - 02:48 AM
Followup question: where should I begin learning the more esoteric C++ stuff?
#10 Moderators - Reputation: 13533
Posted 09 August 2012 - 03:02 AM
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.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.
Edited by Hodgman, 09 August 2012 - 03:07 AM.
#11 Members - Reputation: 140
Posted 09 August 2012 - 05:30 AM
#12 Members - Reputation: 498
Posted 09 August 2012 - 08:36 AM
Honore de Balzac
#13 Members - Reputation: 157
Posted 09 August 2012 - 10:39 AM
Followup question: where should I begin learning the more esoteric C++ stuff?
There are a few places. I would recommend checking out the C++ newsgroup comp.lang.c++.moderated (http://www.gotw.ca/resources/clcm.htm), there are always some crazy C++ topics going on in there, and I learn something everytime I read it.
Another set of books is the Essential C++ and Essential STL books, as they cover some basic things as well as overlooked things (such as the STL vector <bool> being specialized in its implementation (which is unlike the rest of the STL)).
Articles by Andrei Alexandrescu or Herb Sutter usually cover some advanced topics.
Also, if you are interested in esoteric template stuff, check out template metaprogramming examples implemented in C++. (http://www.codeproject.com/Articles/3743/A-gentle-introduction-to-Template-Metaprogramming)
it really worth to learn all new C++11 features in order before advancing into creating games or other complexed applications?
IMHO no. In fact, relying on C++ 11 features may prevent you from writing good cross-platform code as it is only supported by the newest compilers, and even then it seems implementations vary widely compared to implementation of older C++ features. Also, I haven't see much code that uses C++11 features. Honestly, you're better off not using it until you really have a lot of experience in programming and game creation. I would even turn to third party libraries such as Boost first which have a lot of C++11 functionality, but at the additional benefit that it is more portable.
BTW, I have been programming in C++ for 6+ years, and I have never needed C++11 type functionality. It has some really usefuly features, and I am getting into using them now mainly for specialized applications, but it certainly is not nessecary. I would never use it in open source software i would release to the publice. I would recommend getting in the habit of using smart pointers and the such, but unfortunately a lot of real production code doeesn't use these (at least that I've seen).
That's my opinion on C++ 11, but I welcome any opposing views!
#14 Members - Reputation: 498
Posted 09 August 2012 - 02:22 PM
And it is worth to learn C++ file handling if I will do all file handling in QT and so on. I think SDL have its own file handling.
Honore de Balzac
#15 Members - Reputation: 3283
Posted 09 August 2012 - 03:52 PM
OK. So can anyone give me best resource for learning STL after I finish with general C++?
And it is worth to learn C++ file handling if I will do all file handling in QT and so on. I think SDL have its own file handling.
C++ file handling is virtually identically to string console handling, so you will get that as a freebie.
I would consider picking up a book at that point personally.






