|
|
|
|
Anytime the words "friend function", "strange error" and "MSVC 6" are uttered together, there's a good chance you're dealing with the infernal "friend" bug in VC6. If you haven't yet, go download the latest service pack (it is up to Service Pack 6 now) at: http://msdn.microsoft.com/en-US/vstudio/downloads/updates/sp/vs6/sp6/default.aspx |
What compiler is it, and what version? I gather that with Visual C++, anything before 7.1 was pretty crappy. |
This is an error acknowledged by Microsoft. The latest issue of the C++ Report contains a Microsoft support article number where you can find a fix. However, there is a workaround: Skip saying using namespace std and instead say using std::string, using std::vector etc., in brief list explicitly all the std facilities you are about to use in your program. |