This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error while cout command compiling


You might try, instead of trying to use the deprecated version
of iostream.h, to do something like this:

#include <iostream>
using namespace std;
int i=2;
static int si;
const int ci=2;
struct { int i,j;} s={21,22};
int main(void)
{
int j=11;
cout << s.j;
return 0;
}

Also, make sure that you compile with g++, not gcc....

Wayne Keen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]