saai
12-09-2000, 06:50 PM
I am trying to write some file handling routines for my program, using C++ on slackware 7.0.
I have several function prototypes in my own header file that return an fstream object. My problem is, when I include fstream(.h) or iostream(.h) in the same header file, followed by 'using namespace std;', I get the following error:
In file included from /usr/include/g++-2/iostream.h:31,
from /usr/include/g++-2/fstream.h:30,
from filesystem.h:7, (my file)
from menu.h:12, (my file)
from main.cc:10: (my file)
/usr/include/g++-2/streambuf.h:210: arguments given to macro 'clear'
In file included from /usr/include/g++-2/fstream.h:30,
from filesystem.h:7, (my file)
from menu.h:12, (my file)
from main.cc:10, (my file)
/usr/include/g++-2/iostream.h:186: arguments given to macro 'clear'
/usr/include/g++-2/iostream.h:189: arguments given to macro 'clear'
The file be compiled is main.cc. Does anyone know why this is happening?
Thanks,
Saai
I have several function prototypes in my own header file that return an fstream object. My problem is, when I include fstream(.h) or iostream(.h) in the same header file, followed by 'using namespace std;', I get the following error:
In file included from /usr/include/g++-2/iostream.h:31,
from /usr/include/g++-2/fstream.h:30,
from filesystem.h:7, (my file)
from menu.h:12, (my file)
from main.cc:10: (my file)
/usr/include/g++-2/streambuf.h:210: arguments given to macro 'clear'
In file included from /usr/include/g++-2/fstream.h:30,
from filesystem.h:7, (my file)
from menu.h:12, (my file)
from main.cc:10, (my file)
/usr/include/g++-2/iostream.h:186: arguments given to macro 'clear'
/usr/include/g++-2/iostream.h:189: arguments given to macro 'clear'
The file be compiled is main.cc. Does anyone know why this is happening?
Thanks,
Saai