FILE* file = fopen("c:\\file.txt","r"/*Open params*/);

int data;

fscanf(file,"%d",&data);

fclose(file);

Hope that helps.
use "r" for reading, use "w" for writing, use "a" for appending at the end of file. Although you need to use fprintf instead of fscanf.