This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc/g++ 3.0.3 namespace problem
- From: Ukrit Visitkitjakarn <visiukr at usa dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: 13 Feb 2002 10:48:11 CST
- Subject: gcc/g++ 3.0.3 namespace problem
Dear all,
First, I'd like to thank John and Kayvan for helping me fix the problem in my
cpp code, which was caused by improper use of namespace.
The test code that I used is listed below for reference.
test.cpp:
#include <string>
#include <stdio.h>
int main() {
string a;
a="test";
printf ( "test message: %s", a.c_str());
return 0;
}
John and Kayvan suggested using 'using namespace std;' to make this test code
compiled. I tested it and it works.
Now I ran into the problem where I have almost 50 files to change (inserting
'using namespace std;'.)
Is there any gcc/g++ switch/flag that I can use so that I can compile the test
code without using 'using namespace std;' ?
** Please reply to my email address, I am not in the gcc mailing list **
Thanks you very very much
Ukrit
____________________________________________________________________
Get free e-mail and a permanent address at http://www.amexmail.com/?A=1