KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C. unsigned char buffer[256]; for (int i = 0; i < 256; i++) buffer[i]=i; int size = 1; int count = 256; Binary mode: FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary); Versus text mode: FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text);
Tags (comma-separated)
Save Edits
Cancel