|
-
October 16th, 2012, 03:33 PM
#4
Re: Save and Read struct help? binary file
 Originally Posted by s123456
like this?
Code:
for(int i = 0; i< 4;i++)
{ cout << file.read(reinterpret_cast<char*>(&yourCat), sizeof(struct Cat));
cout << setw(10) << left << yourCat.name << "\t";
cout << yourCat.age <<endl;
}
- What this highlighted "statement" could mean?
 - Please, use Code tags while posting code snippets!
Victor Nijegorodov
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
|