I was wondering If I could jump positions in a text file. Suppose I have this file. 12 8764 2147483648 2 -1
For some reasons开发者_如何学编程 I need a file pointer (FILE*) that points to nothing. It means I can pass it to fprintf function and fprintf ignore the file pointer.
I think my problem with my code that the file is not being passed correctly. The input is a file with three lines
If a file is opened using the following command: FILE *f1=fopen(\"test.dat\",\"a+\"); The man page reads:
Is there a way to do what ftell() does (return the current position in the file) on a raw file descriptor instead of a FILE*? I think there ought to be, since you can seek on a raw file descriptor usi
How can I get the current 开发者_JAVA技巧line position of the file pointer?There is no function that gives you current line. But you can use ftell function to get the offset in terms of number of char
I want to know the difference between a file descriptor and file pointer. Also, in what scenario would you use one inste开发者_Python百科ad of the other?A file descriptor is a low-level integer \"han