Advertisement

empty I/O

Started by November 17, 2000 05:32 PM
1 comment, last by Gaiiden 24 years, 1 month ago
hey, I made a console app that copies a file from here to there on your hard drive just to test some stuff out. Well, I tried to print out what I was reading from the file and storing in variable x, but I got nothing! All I got was a few lines of nothingness. Can binary data be printed out like that or am I just ont reading in anything? I have to be since the copied file pops up with data in it. And I print out the data (or try to) right after i read it in. ============================== "Need more eeenput..." - #5, "Short Circuit" ==============================

Drew Sikora
Executive Producer
GameDev.net

It probably depends on what your data is, what kind of variable x is, and how you are trying to print it. Some binary sequences represent unprintable characters.

If you want to be able to see something for sure, try copying a text file and have x be a char. If you are using fopen(), then open it in read text mode ("rt"). I''m sure there is something similar in C++ iostreams.
Advertisement
awright, that''s kinda what I thought

==============================
"Need more eeenput..."

- #5, "Short Circuit"
==============================

Drew Sikora
Executive Producer
GameDev.net

This topic is closed to new replies.

Advertisement