C++ bug in EGCS v1.1.2 (accepting incorrect code)
Petter Reinholdtsen
pere@hungry.com
Fri Apr 16 07:48:00 GMT 1999
EGCS v1.1.2 accepts this code:
#include <iostream>
int
main()
{
cout << "hello world" << endl;
}
It should not accept cout as it stands. Borland C++ Builder 4 reports
the following:
error C2065: 'cout' : undeclared identifier
This code should work:
#include <iostream>
using std :: cout;
int
main()
{
cout << "hello world" << endl;
}
When will namespaces be fully supported?
--
##> Petter Reinholdtsen <## | pere@td.org.uit.no
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!
More information about the Gcc-bugs
mailing list