PDA

View Full Version : about stdiostream.h and strstream.h



Alain Delon
3rd March 2011, 04:33
Hello,
As we know, stdiostream and strstream are not use again in new gcc version, but some old program use them. I need to amend it.


#include <iostream.h>
#include <stdiostream.h>
#include <fstream.h>
#include <strstream.h>

class Slave : public SlaveBase {
public:
Slave(char* hostName_, int port_);
~Slave();

void SendMessageToMaster(char* msg);

char* GetMasterHostName();
int Initialize(int slaveID);
int ConnectToMaster();
SockInetClient* GetMasterChannel();
void DoSession(CallBackBase<SessionData>& callBack);

istdiostream& IStream();
ostdiostream& OStream();
FILE* Stream();

protected:
CString _hostName;
int _port;
SockInetClient* _masterChannel;
FILE* _fp;
istdiostream* _istd;
ostdiostream* _ostd;
};
#endif

int CAdvFEGenericAttribute::set(char* str)
{
char buf[1024];
istrstream s(str);
s >> buf; this->set(0, buf);
s >> buf; this->set(1, buf);
s >> buf; this->set(2, buf);
s >> buf; this->set(3, buf);
s >> buf; this->set(4, buf);
return (0);
}

How can I do?
Thank you for you kindly help!

high_flyer
3rd March 2011, 11:07
Just use the new ISO headers without the 'h' suffix.


//#include <iostream.h>
#include <iostream>