Writing numbers to files
- Posted by dstanger at belco.bc.ca Jul 01, 2001
- 394 views
Hello, I hope that someone can help me with this DOS program: I am obtaining the color numbers of a bitmap on the screen using get_pixel() and then writing them to a file. When I use puts() to write them to the file it saves the color numbers as characters which I don't want. If I use print to write them it does so as numbers but puts them in a lump that is useless to me. Eventually, I want to be able to read the numbers out of the file and convert them back to colors on screen using pixel() but until I can save them in a way that I can read them again I am stuck. So, what I am looking for is either a way to turn the characters back into numbers or a way to seperate the lump of number produced by print. Or a better way to save them to file in the first place! Many thank, David S.