G
Gernot Frisch
does this work:
struct XY
{
int crc; std::string filename;
}
std:fstream& operator<<(std:fstream& os, const XY& me)
{
os << me.crc;
os << me.filename;
return os;
}
std::ifstream& operator>>(std::ifstream& is, XY& me)
{
is>>me.crc;
is>>me.filename;
return is;
}
if fstream's are opened in binary mode?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com
struct XY
{
int crc; std::string filename;
}
std:fstream& operator<<(std:fstream& os, const XY& me)
{
os << me.crc;
os << me.filename;
return os;
}
std::ifstream& operator>>(std::ifstream& is, XY& me)
{
is>>me.crc;
is>>me.filename;
return is;
}
if fstream's are opened in binary mode?
--
-Gernot
int main(int argc, char** argv) {printf
("%silto%c%cf%cgl%ssic%ccom%c", "ma", 58, 'g', 64, "ba", 46, 10);}
________________________________________
Looking for a good game? Do it yourself!
GLBasic - you can do
www.GLBasic.com