I've just learnt quite a bit of c++ including file i/o, pointers, dynamic allocation, classes, and so on. I'd like to learn more but the problem is I dont know what else I can learn. I've heard about things like vectors/string classes/some std thing/stl stuff but I'm not really sure if they're worth learning. I'll apparently have to use a different compiler since Turbo C++ (if I've heard correctly) cant handle them. I've never usedusingnamespace std; in a program anyway. So I'd like to know if its worth making the switch. If it makes coding easier, I'd gladly do it.
I'd also like a little info on vectors and the stl library (if thats what its called).
Imagine you want to be able to store a lot of objects in an array, but you don't know in advance how many you will want to store during your program execution. It could be 1, it could be 100 million... Without using vectors (unless you code your own data structures or use another library), you will have to either declare an array with a MASSIVE size, even if you only hold 1 object, or you could keep resizing the array over and over again using realloc() or something - both really bad approaches. This is why vector is nice.. you don't need to know a size in advance, and you can just keep adding objects to the vector and it grows as you put more stuff in. That's just one basic example of why STL is so important - there are thousands more.