|
-
March 27th, 2009, 06:55 AM
#2
Re: Sending data over SOCKETS (serialization)
Came across the following stuff, which does work, but I want the character representation, not the file. Is there something similar???
ofstream out("binary.txt", ios::binary);
out.write((char*)&products, sizeof(products));
out.close();
ProductInfo test[10];
ifstream in("binary.txt", ios::binary);
in.read((char*)&test, sizeof(test));
cout << test[2].get_make();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|