Hey,
I'm trying to write a small program using Visual C++ that will read in a log file, parse it, and then use that to update a MySQL database.
I downloaded the Visual C++ API (v 1.7.1) and started messing around with the examples that they provide and didn't have any problems making them connect to the database or run SQL statements. It generates several warnings at compile time, but these are expected according to the API's documentation.
The problem comes when I try to '#include <fstream.h>' in order to add an 'ifstream' object to be used to read in from the log file. At this point the code ceases to compile and instead starts generating:
error C2872: 'ostream' : ambiguous symbol
in just about every header file related to file IO in Visual Studio's include directory as well in the headers provided with the MySQL++ API. Needless to say this has me frustrated as all I seem to be able to do with the MySQL++ API in a program is connect to a database.
I've tried seperating the code into different files (which I never really expected to work, but hey) and have checked that I have correct libraries and dll's loaded for use with MySQL.
I've spent the last day feeling like I'm banging my head against a wall here and asides from the relief I get when I stop it's not helping me at all. If anyone has any ideas or solutions for me please help. Even if it's just a suggestion of a different part of the wall to hit... every little bit helps. I can only hope that I'm being very stupid somewhere and that someone can send a one line fix to the problem...
Thanks in advance,
Matt
mbeets@omam.com