Other urls found in this thread:


Did he just spend like 40 minutes explaining that sequential data access is faster than random data access.

u deserve it tbh fam

Have you tried looking for a more general (not tied to a single library) tutorial on modern C++? If you know modern C++ by itself, I suppose you should be able to translate much of the old trash to it.

I don't know man. I'm willing to bet there's more than a few CS grads out there who know nothing about cache locality and everything about how "elegant" linked data structures are.

smh fam. you're supposed to aim at the roof of your mouth (brainstem specifically), not your temples.
sage for offtopic

Effective Modern C++ isn't too bad. It focuses on C++ 11 and 14. It drones on a bit, but far less than some other books. The most annoying thing is it intentionally shows you how not to do things and after hours of reading, it's easy to forget they're showing the wrong way to do it.
The C++ Standard Library 2nd Edition by Nicolai Josuttis has a good section on C++ 11.
Programming with C++ 17 is another book by Josuttis, but it's not finished yet. He has a pretty good writing style.


Emacs Lisp is even uglier then C++ though

Go read Bjarne Stroustrup's work.

Stallman can go fuck himself.

It's ugly (like all lisps) but C++ always takes the crown.

You open with what is clearly worded as a statement or hypothesis but your link doesn't contain any supporting evidence. Are you perhaps illiterate, or mentally retarded?

SDL is a C library anyway, you goddamn brainlet wojakposting cuckchanner.

Check out Alex Allain's Cprogramming.com; Alternatively, check out his book, Jumping into C(++). As a previous user mentioned, Bjarne Strostrup has an excellent collection, and it's the de-facto standard for college level courses.

Why the fuck did they placed a light bulb into the psu?

It must be one of those new age fads.

gaymur lighting?

Engineering newfag here, doing c++ this term. I can't understand what the point of the ‘using’/‘using namespace’ is. Surely if I've included something it means I want to use it no?

Including and doing that are different things. Let's take a look a cout from the standard library. If it's just included you need to use it like so:

You can declare things in a namespace. "using namespace foo;" means that you can use things in namespace foo without specifying every time that the thing is in namespace foo. For instance: namespace loo{int poo = 1;}//without using namespace:int designated1 = loo::poo;//with using namespace:using namespace loo;int designated2 = poo; You're probably familiar with "using namespace std;". This is used because standard library things (like std::cout) are all in namespace std.
#include "india.h" just means that you're literally copy-pasting the content of india.h into your file, so things are still inside their namespace.

Are you making a statement or do you not know how to formulate questions in English? Pro tip: you swap the verb and the noun (this is called an inversion) and you place a question mark at the end of the sentence.

If it was a question: I guess most people just don't know modern C++. They learned C with classes, or some slightly more modern C++, usually from someone who also only knew C with classes, and so it gets perpetuated. It doesn't help that modern C++ is fucking ugly as shit and is literally bolted onto the language.

SDL is a C library, and Lazyfoo is an ass for writing the tutorial in C++. Learn SDL, then learn modern C++, and then you will be able to put the two together without problems. If you want to follow the Lazyfoo tutorials just suck the crappy C++ down, you're not in for the C++ code, you are in for the SDL code.

I didn't know that until I watched a video by Stroustrup and was also raised on "le O(1) insert". And now I am paranoid of linked lists and try avoiding them beyond what is reasonable.

Yes. Read my book!

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.

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/watch?v=rX0ItVEVjHc

You're so fucking retarded. It's hilarious.

Modern C++ sucks ass, like all modern programming paradigms.

cuz everyone's busy doing javashit

stroustrup has three different books on modern c++ depending on your needs and skill level
i hear he knows a little bit about the language

the fuck is this horseshit

Ah... I see, you're one of those guys that are so fucking annoying and go preaching around how everyone should code using the newest standard that comes up every week, and how new people should not be allowed to know how the underlaying metal works (so they don't know how to be faster, so, you don't have an excuse to go faster either).

I'm sorry dude. It's not fast people the ones making you slow. You're the one making yourself (and other people) slow, with poor design desitions.

You're going for untested features in all senses, you don't know how well new features are implemented, and you don't even know if those new features are all that useful in making implementation speed faster. Basically you're just using a new tool just because it's new, and not because it's the tool you need.
Zealous attachment to wathever the c++ dark council chooses to fancy on currentYear is a sign you have never programmed for speed, stay out of this conversation and stop pretending you have enough idea to be calling things horseshit, when your code is probably as sluggish as stale puke.

But does he know anything about programming?

Why would you want to use Modern C++ with SDL OP? Assuming you're not just troleing, then use SFML and read a good book. I suggest Stroustrup or Meyers.

every time

Try Rust.

The choice of cock-monglers everywhere.

At least it's :

Everything that C++ isn't

Modern C++ is modern though.