Yes. Read my book!
WHY MOST C++ TUTORIALS ON THE WEB DONT TEACH MODERN C++
Just use a vector fam
...
all the cool kids use sfml
It's all good as long as it's a newer CFL
C++ is OK if you don't veer off the reservation and try to do things that it can't understand*. You will find most tutorials tell you what you should do, but not examples of what you shouldn't do & why you shouldn't do it - which can sometimes be even more important for beginners when learning to code. The why is often more important to understand than the how, since you can deduce the how from understanding the why. (Essentially there not as much focus experience transferal)
-Why can't I do this?
No, you don't do that. Do this.
-Yes, but that seems a convoluted solution. Why can't I simply do this?
Do you want it to work or not?
-Yes, but why can't I do this and it work too?
I don't know. It just doesn't. Do you want it to work or not?
*before you sperg out "C++ does it all" telepathically tell your computer what you want to type. Did it do it? No? That's because it can't understand telepathy. C++ can be used to "do it all" solution wise, but (I was talking about coding syntax (concept interpretation) here) there are things it can't do.
unsigned int I_dont_want_a_pointer_I_will_fill_array_later [] [] [];
You can sort of think of it like an abbreviation, or path setting.
When you #include it you say "I'd like to have available..x..because I'm going to use it later", but when you actually use it you need to say it's full name.
std::cout
Yes, but when you use it, you must use it's full name.
I send an invite (#include) to Mr. Keith Peterson because I want him at the dinner.
When he attends I must always refer to him using his full name "Mr. Keith Peterson" to not get confused with other guests called Keith. If I have stated I'm within his circle of friends (namespace) I can call him "Keith", but there is the possible danger of getting confused with another guest.
#include - includes the code, by copying it and pasting it
namespace - includes the named scope, so you don't have to write it in full each time.
Thanks user, it's would have been great if my professor with his very dubious accent explained that properly instead of just saying "please pasta this into your code".
I already understand how headers work because I played around with C before attending uni, I just wish my prof and his niggershit textbook would actually teach something besides pajeet programming techniques.
modern c++ is not designed for performance speed, it's designed for safety, "implementation speed", an trying to be coop and hip with the in crowd (which no c++ programmer will never get)
If you're going for sdl2, you probably are going for something graphic, this does not need implementation speed but rather performance speed, you want to churn triangles at the highest speeds to your graphics card, not worry about having total reflection and runtime bounds checking and some class being uncle sister mentor bing bong to another class.
Thus, any tutorial talking about games that is actually talking about modern c++ is simply not worth it, you shouldn't be writing games on modern, but rather adopting something like orthodox c++
also watch this youtube.com
You're so fucking retarded. It's hilarious.