complier bug endl in VS.NET 2003

G

Guest

I was compiling a VC++ application in VS.NET 2003 and got the following error:

The following line #1 will not complied and created the following MS
compiler error.
If I change endl to "\n" s in #2, it got compiled. I believe this is a
compiler bug. Has it been identified as bug and has a fix?

1. cout << "ERROR, invalid severity specified in file: "
<< "my file name" << endl;
INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information


2. cout << "ERROR, invalid severity specified in file: "
<< myLogConfigFile << "\n";
Compiled.
 
P

pvdg42

Steve Wonderful said:
I was compiling a VC++ application in VS.NET 2003 and got the following
error:

The following line #1 will not complied and created the following MS
compiler error.
If I change endl to "\n" s in #2, it got compiled. I believe this is a
compiler bug. Has it been identified as bug and has a fix?

1. cout << "ERROR, invalid severity specified in file: "
<< "my file name" << endl;
INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information


2. cout << "ERROR, invalid severity specified in file: "
<< myLogConfigFile << "\n";
Compiled.
As endl works per specifications here in VS .NET 2003, you may have a
corrupt installation.
What type of application are you writing (i.e. which template), and does
endl always fail, no matter the context?
What is the significance of the differences between the first and second
examples beyond use of "\n" vs. endl? Why does one have << "my file name" <<
endl; (string literal "my file name") and the other have << myLogConfigFile
<< "\n";
What type of object is myLogConfigFile?
Please provide a sort, but complete, program that produces the problem on
your system.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top