Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Quick c question

Name: Anonymous 2010-11-07 21:30

Do FILE* work directly with the address of the file in the harddrive or is the file loaded into the ram and the FILE* works with that?

I mean, if I were making a small database and wanted to use a FILE* (as a member of the struct I use for the database) to the next element of the database would the FILE* still point ot the same location if I close the file and open it later?

Name: Anonymous 2010-11-08 14:20

I generally do this to access forbidden files:

c:\> dir
file1.txt
file2.txt

c:\>


I can't access file2.txt - administrator owns it, so I do this:

#include <stdio.h>

int main(void)
{
  FILE *f = fopen("file1.txt", "w"); // success - i can access file1.txt
  f = f + 1; // move onto the next file - file2.txt
  fprintf(stderr, "lol noob, i beat you 100%\n");
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List