Skip to content

Instantly share code, notes, and snippets.

@taq
Created April 12, 2012 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taq/2370634 to your computer and use it in GitHub Desktop.
Save taq/2370634 to your computer and use it in GitHub Desktop.
Lendo do arquivo, em C.
#include <stdio.h>
int main(int argc, char **argv) {
FILE *file;
int i;
double d;
file = fopen("teste.bin","rb");
fread(&i,sizeof(int),1,file);
fread(&d,sizeof(double),1,file);
printf("%d\n %#f\n",i,d);
fclose(file);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment