Original Post
🔒 Locked
fread + array
Advertisement
No, that wont work. blah is an ''array'', but in C/C++ arrays are just pointers to buffers, so you don''t need to take the reference of blah.
if you want to read 3 floats like that, try:
You can pass a pointer to any buffer to fread().. just make sure to keep track of the proper sizes to pass as the 2nd and 3rd argument.
-Brannon
if you want to read 3 floats like that, try:
|
You can pass a pointer to any buffer to fread().. just make sure to keep track of the proper sizes to pass as the 2nd and 3rd argument.
-Brannon
Unfortunately, iostreams have performance issues.
or maybe programmers should start learning how to program.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Edited by - jenova on January 12, 2002 6:25:29 PM
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Edited by - jenova on January 12, 2002 6:25:29 PM
quote:
Original post by Beer Hunter
Unfortunately, iostreams have performance issues.
Which are in large part balanced (or outweighed?) by their ease of use and superior design. And the performance hit isn''t that severe either.
Probably the only read advantage of C-style IO is with large text formatting problems (columns, tabs, yadda yadda).
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement