|
Hello all,
I've just started playing around with STLs and encountering a few problems. I can quite merrily create an STL with a class and add/delete/whatever class objects, however, how can I pass the entire STL into a function?
I can pass individual STL class objects into another function by treating it as a normal class object and that works fine.
I'm also experiencing problems attempting to save and load the entire STL contents to/from a file. I can get ofstream to write to a file, but I've been advised to use the ios::binary flag and the compiler doesn't like this. Without this I can get it sort of working, though the last object in the list is written twice - or nothing is written at all. Corruption of the data is also occurring.
There's clearly something obvious I'm missing.
Thanks for any assistance.
|
|
|
|
|
|
|
// |