I just wanna ask how important it is to learn/master the basics of iostream in c++.
and all that bullshit.
for me, its kinda hard to remember because i never use it when i make games, and i never use it when i test my own code (only cout and cin), but sometimes when i read books, they use it. So its getting hard and frustrating to remember how the iostream is made and when the states are set.
I just learned templates, and i know quite abit right now.
So i just wanted to ask if there is any situation where you want to make your own class template. Becasue vectors already exist, and i cant really imagine when you should even need to define your own class templates.
But i know defining your own function templates are very useful in alot of kinds situations
Hey, i just need some information on how to check collision if theres 1000 objects on the field. And all 1000 objects are enemies to eachother.
So, do i for example have to make two for loops like this?:
[source lang="cpp"]for(int i = 0; i < objects.size(); ++i) //objects.size is the size of the vector(if i use that) for(int j = 0; j < objects.size(); ++i) collision(objects[i], objects[j]);[/source] But thats 1000x1000 = a million loops in a single statement
So, i just want to know if thats how you do it... cant see any other way of doing this so far