Skip to content

Instantly share code, notes, and snippets.

@sixones
Created April 24, 2010 16:31
Show Gist options
  • Save sixones/377757 to your computer and use it in GitHub Desktop.
Save sixones/377757 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *file;
long size;
char *buffer;
size_t data;
file = fopen("hide.bmp", "rb");
if (file == NULL) return 1;
fseek(file, 0, SEEK_END);
size = ftell(file);
rewind(file);
buffer = (char*)malloc(sizeof(char)*size);
fread(buffer, 1, size, file);
fclose(file);
free(buffer);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment