This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
C++ code compilation problem - issues with difference in standards
- From: Anticipating a Reply <ruxyz at yahoo dot com>
- To: GCC HELP <gcc-help at gcc dot gnu dot org>
- Date: Wed, 10 Sep 2003 12:55:15 +0100 (BST)
- Subject: C++ code compilation problem - issues with difference in standards
- Reply-to: ruxyz at yahoo dot com
Hi,
I 'am getting compilation errors when I try to compile
the below c++ sample code , using g++ version 3.2 .
By referring to the below link , I found a
workaround .
http://www.cs.odu.edu/~zeil/cs361/Lectures-f02/00faq/faq/backwardsHeaders.html#backwardsHeaders
When I include line number 9 as part of the code
( i.e. uncomment it ),the compilation goes through
fine .
I would like to know if there is a better approach
to resolve this issue ? Are there any compilation
flags which allows this to compile without errors ?
Regards
-------------------------------------------------------------------------------------
1 #include <iostream>
2
3 #include <string>
4
5 int main() {
6
7 char second[]=" WORLD !";
8
9 //using namespace std;
10 string mesg = "HELLO" + (string)second;
11
12 cout << mesg << endl;
13
14 return 0;
15
16 }
----------------------------------------------------------------------------
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com