codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Problems with STLs  Clive73 at 16:31 on Sunday, May 08, 2005
 

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.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007