Tulluin
10-19-2002, 09:16 PM
Up until RedHat 8.0 (I was in 7.3) I was using GCC 2.96 to compile my C++ programs for class. It worked fine for my relatively simple programs. Now, in RedHat 8, I have a newer version of GCC, and it says things like:
channels.cc: In function `int main()':
channels.cc:11: `string' undeclared (first use this function)
channels.cc:11: (Each undeclared identifier is reported only once for each
function it appears in.)
channels.cc:11: parse error before `,' token
channels.cc:14: `cin' undeclared (first use this function)
channels.cc:15: `cout' undeclared (first use this function)
channels.cc:15: `endl' undeclared (first use this function
I was told I have to use declarations like this now:
using std::cout;
using std::cin;
using std::endl;
I also can't declare global variables anymore.
Is there a way to change this so I don't have to use the using std: statements, and I can declare global variables, without having to go back to an older gcc? The dependancies are crazy.
channels.cc: In function `int main()':
channels.cc:11: `string' undeclared (first use this function)
channels.cc:11: (Each undeclared identifier is reported only once for each
function it appears in.)
channels.cc:11: parse error before `,' token
channels.cc:14: `cin' undeclared (first use this function)
channels.cc:15: `cout' undeclared (first use this function)
channels.cc:15: `endl' undeclared (first use this function
I was told I have to use declarations like this now:
using std::cout;
using std::cin;
using std::endl;
I also can't declare global variables anymore.
Is there a way to change this so I don't have to use the using std: statements, and I can declare global variables, without having to go back to an older gcc? The dependancies are crazy.