User forums > Using Code::Blocks
Using textfiles with Code Blocks
thomas:
--- Quote ---This doesn't work for me, too, because the function to read every single Byte is not in main() but in another .c-file.
--- End quote ---
Now be serious :) Then turn recordByte() into recordByte(FILE* f) (and the other function likewise), and pass on the file descriptor. Or, if you think that is too much hassle, just use a global variable which you initialise in main(). Global variables are not pretty, but they do the job for such a purpose.
Navigation
[0] Message Index
[*] Previous page
Go to full version