I have worked in C and C++ for a while, but have always made an effort to avoid class templates and especailly the STL. Well now I have found some code that represents a client that would be really useful to me but it uses STL extensively.
Anyway I compiled the client and it compiled fine. I then noticed that the client contained two seperate buffers (each is a list<string>) that could be used at the same time, but was only using one mutex to control access to both. Access to wait and release the mutex is controlled through two class methods and the mutex itself is private. Other class functions dealing with the two buffers use a const std::string& to decide which buffer to work on so I changed the class def (.h) as well as the implementation (.cpp) for the two mutex functions by adding an additional const std::string& to the beginning of the arguments of each (of course I also created the second private mutex). Other changes in the client needed to be made where other project members made use of the mutex functions, but only four changes were required (two pair), once where a buffer is read from (and item is removed) the other where the second buffer is written to.
Now I get the error listed in the subject.
Line 21 appears to be dealing with a constructor for the pair struct. I have checked the modified date of <utility> but it checks out with a date from 1998. I am at a complete loss. Any thoughts about what this is or how I go about troubleshooting it

utility(21) : error C2059: syntax error : 'end of file'
Fahad349
Constantijn Enders
Don't stay away from the STL! It's a brilliant library, and as you use it, I assure you you'll learn to love it
That sounds like a multi-part problem. If you want to shed some more light on the potential race conditions and thread compromisation, you should provide a tad more information about the code layout, as well as the general flow throughout the application. A quick digression, this being thread related: I'm working on a library you may (or may not) find handy, which can be found at http://www.codeproject.com/useritems/threadsynch.asp. If nothing else; it does describe alternative ways of dealing with interlocked access to shared resources such as your lists.
Which version of VC are you using The file dating back to 1998 suggests VC6, which in that case may very well be your culprit. A lot has changed since then (especially considering that the STL wasn't fully specified when VC6 was written / released), so it's entirely possible that the issue you are witnessing is caused by an actual library or compiler bug.
In either case, can you paste the lines referenced in your error message, and perhaps attempt to reproduce it with as low a source size as possible
Mystagogue
Chrono20944