Standard Template Library (C++)
h
DynamicSquid (2254)

Hey guys! Currently I'm making a tutorial on STL containers (std::vector, std::list, std::etc.), and I think I might publish it around next week.

So does anyone have any suggestions of things to include? I'm definitely going to be going over the basic STL containers, along with some useful tips and algorithms. But is there anything different you guys will want to see?

Please let me know in the comments. Thanks, and see you next week!

UPDATE: It's released!

You are viewing a single comment. View All
theangryepicbanana (1602)

You should try to include cool things like std::map, std::initializer_list, std::tuple, and std::function :)

DynamicSquid (2254)

@theangryepicbanana For sure! I'll include maps, lists, sets, and all those. I already replied to @Highwayman on this, but for std::tuples, I know enough about it's basics, but I don't know all the advanced stuff you can do with those.

DynamicSquid (2254)

@theangryepicbanana Also I feel like std::function could be a tutorial of its own... What do you think?

Highwayman (1318)

@DynamicSquid it’s not necessarily used a lot(tuple), but it is cool...
@theangryepicbanana oo std::function! nice one!

Oh my. I’m geeking out over the stl.
Oh no.

nt998302 (160)

@Highwayman It throws me whenever my teacher assigns me something and they use "->". I'm just like, "POINTER!!!!"...

Highwayman (1318)

@nt998302 Do you geek out specifically over pointers?

Highwayman (1318)

@nt998302 pointers are pretty sick. :P I still don’t like smart pointer though I’m really behind on learning those :/

ipastrano (244)

@Highwayman I looove pointers, as for the smart pointers, i only know unique_ptr as for smart ones. I dont really see the point of smart pointers, the delete function is there for a reason.

DynamicSquid (2254)

@ipastrano Wait, there's different types of smart pointers? Wut?

Anyway, some people criticize C++ for having no automatic garbage collection. But that's why we have smart pointers. Right? Or are they just too much of a hassle that delete is just better?

Highwayman (1318)

@ipastrano

I looove pointers

it’s funny, cause all us C++ programmers love pointers, and the only real reason that I ever really read about for ppl not to like C++ is because of pointers.. lol

Anyways Idk bout that. The point is to reduce the likelihood of bugs like memory leaks and stuff, yes? I guess the reason I personally don’t like them is more because I’m really nervous all the time about using STL containers, because I’m never entirely sure how they will act in certain vital situations. I guess I’m just too lazy to look it up?

DynamicSquid (2254)

@Highwayman That is true. C++ is one of the few languages with pointers. So I guess we kinda just got use to it lol

DynamicSquid (2254)

@Highwayman It funny how the first language you learn acts as a base, and all the other language that are different from the first one are weird. Like have you seen Java's classes and object syntax? It's ridiculous!

Highwayman (1318)

@DynamicSquid ya know, I feel like that’s just java. Like java is just not.. I can’t even describe my resistance to learning java.

ipastrano (244)

@DynamicSquid there's `weak_ptr and another one that i forgot the name of. they are a bit of a hassle, delete is just easier, but i guess it can be tedious in a long program with a lot of dynamically allocated space, and the memory leaks can add up. But i still like delete bc im careful.

DynamicSquid (2254)

@Highwayman Word. Like the first time I saw Java's classes and objects syntax, I gave up immediately. Like wdym you have to specify the visibility for each individual attribute??? And they don't even have private or protected inheritance, let alone multiple inheritance

Highwayman (1318)

@DynamicSquid honestly! Why! Like tf man.

Highwayman (1318)

@DynamicSquid yeah :p
We are just going off on the randomest things rn lol

DynamicSquid (2254)

@Highwayman yeah lol. As long as we're talking about C++, that's fine with me. I never have any conversations about C++, let alone programming anywhere but here

Highwayman (1318)

@DynamicSquid I’ve had conversations about programming with my friends before outside of repl.it, but they never seem to be meaningful(programming wise I mean) in any way lol. This really is just the best place for programmers. It really is.