Quote:Original post by slayemin
Thanks, oddly that worked. (???) I don't understand why I have to use std::ifstream on some variables but not on others
Basically that's what namespaces are for - resolving ambiguities.
If you put 'using namespace std;' everywhere, you prevent the parser from resolving name collisions (I cannot tell you why they appeared in your files, I don't have the full source and doesn't really matter). In that case you have to be explicit and add the namespace you meant manually.
The same might happen inside classes - suppose you have a class that features amember function called 'SetTimer()', which takes a pointer and two INT parameters. Now inside other class members you might need to manually set the scope of the function you want to call, because the windows API also contains a SetTimer() and the compiler will use the clas method (local scope) by default.
So in this scenario, if you want to call the actual Win32 'SetTimer()' you will need to put '::' in front of each SetTimer() call if you want the global function.
This might sound a little confusing but that's C++ [smile] - a fairly complex beast. You can read more about namespaces, name collisions and scopes
here.
(there are better tutorials - just google for them if you want to know more).
Regards,
Pat.