A
A. Farber
Hi,
I'm trying to port a bigger program from Visual C++
to Linux and after rewriting few Visual C++ functions
(strnicmp, filelength, findnext, etc.) I'm finally
down to just one (!) error message and now I'm stuck :-(
Does anybody please know, what could this error mean:
h_utl.cpp: In function `istrstream &operator>> (istrstream &, TVersion &)':
h_utl.cpp:108: no matching function for call to `istrstream::str ()'
Here is the mentioned line from the h_utl.cpp:
istrstream &operator>>(istrstream &is, TVersion &aVersion)
{
char *str=is.str();
When I look into the header /usr/include/g++3/strstream.h
(yes, I have to use g++296, the newer gcc does not work)
there is an str() function in the friend class:
class strstreambuf : public streambuf
{
struct _IO_str_fields _s;
friend class istrstream;
.....
public:
.....
char *str();
virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios:ut);
};
class istrstream : public strstreambase, public istream {
public:
istrstream(const char*, int=0);
};
But how to call it? Do I need some switch for g++296?
Please help the C++ idiot. And no, I can not rewrite that program.
Regards && merry Xmas
Alex
I'm trying to port a bigger program from Visual C++
to Linux and after rewriting few Visual C++ functions
(strnicmp, filelength, findnext, etc.) I'm finally
down to just one (!) error message and now I'm stuck :-(
Does anybody please know, what could this error mean:
h_utl.cpp: In function `istrstream &operator>> (istrstream &, TVersion &)':
h_utl.cpp:108: no matching function for call to `istrstream::str ()'
Here is the mentioned line from the h_utl.cpp:
istrstream &operator>>(istrstream &is, TVersion &aVersion)
{
char *str=is.str();
When I look into the header /usr/include/g++3/strstream.h
(yes, I have to use g++296, the newer gcc does not work)
there is an str() function in the friend class:
class strstreambuf : public streambuf
{
struct _IO_str_fields _s;
friend class istrstream;
.....
public:
.....
char *str();
virtual streampos seekoff(streamoff, _seek_dir, int mode=ios::in|ios:ut);
};
class istrstream : public strstreambase, public istream {
public:
istrstream(const char*, int=0);
};
But how to call it? Do I need some switch for g++296?
Please help the C++ idiot. And no, I can not rewrite that program.
Regards && merry Xmas
Alex