concatenating strings to open files
alright, I'm using linux 9.0 and working in c++:
my question is:
if I use the code,
void Node::Read_In ( ifstream &Nin )
Nin.getline ( Kdata, 4, '\n' );
Kdata = '\0';
I keep getting the error message for the Nin.getline ( Kdata, 4, '\n' ); line.
Node.cxx: In member function `void Node::Read_In(std::fstream&)':
Node.cxx:24: invalid use of undefined type `struct std::basic_fstream<char,
/usr/include/c++/3.2.2/iosfwd:92: declaration of `struct
std::basic_fstream<char, std::char_traits<char> >'
the file being passed in was opened by concatenating two strings together s1+=s2, then using the command
Fin.open ( s1.c_str(), ios::in );