![]() |
| ||
| Reading Binary files via stdin Okay, I need to read in a binary file from stdin and stick it in an array. The file contains binary representations of floating point numbers. I need to make sure that my array is sized properly based on the number of elements. It is quite easy to do with if stream as follows ifstream file("infile.bin", ios::binary | ios::ate);However, I need this to work with a simple redirection, such as program < infile.bin I just can't seem to get anything that works. I appreciate your help. |
| ||
| Re: Reading Binary files via stdin |
| All times are GMT -4. The time now is 1:08 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC