C
Carlo Capelli
Hi all.
Some time ago, upgrading MSVC, i had to debug a little problem, rising from
the change of behaviour of the following code:
#include <fstream>
void main()
{
std:fstream("dummy") << "hello" << std::endl;
}
Using MSVC6, this resulted in a file dummy containing 'hello', after the
upgrade to VisualStudio2005 the file contains the numeric
address (like a fprintf(dummy, "%p", "hello\n"), or std:fstream("dummy")
<< (void*)"hello").
Also gc (i don't know the version) that at the time come with Dev-C++ agreed
with the former outcome.
In my POV, this was a bug of the new compiler/enviroment (i.e. some change
of scope resolution ot include...), so I queried over MS listserv,
obtaining a querelle (of rather technical level) among (i presume) the
compiler' implementors. The outcome was that the compiler should reject the
code as invalid.
What do you think about?
Bye Carlo
Some time ago, upgrading MSVC, i had to debug a little problem, rising from
the change of behaviour of the following code:
#include <fstream>
void main()
{
std:fstream("dummy") << "hello" << std::endl;
}
Using MSVC6, this resulted in a file dummy containing 'hello', after the
upgrade to VisualStudio2005 the file contains the numeric
address (like a fprintf(dummy, "%p", "hello\n"), or std:fstream("dummy")
<< (void*)"hello").
Also gc (i don't know the version) that at the time come with Dev-C++ agreed
with the former outcome.
In my POV, this was a bug of the new compiler/enviroment (i.e. some change
of scope resolution ot include...), so I queried over MS listserv,
obtaining a querelle (of rather technical level) among (i presume) the
compiler' implementors. The outcome was that the compiler should reject the
code as invalid.
What do you think about?
Bye Carlo