All pastes #905557 Raw Edit

Unnamed

public cpp v1 · immutable
·published 2008-02-15 21:29 UTC
rendered paste body
#include <cstdlib>#include <stdio.h>#include "CFBF.h"int main (int argc, char **argv){	if (argc != 2)	{		printf("Usage: %s Input.snp\n", argv[0]);		return 1;	}	FILE *in;	if (!(in = fopen(argv[1], "rb")))	{		printf("Could not open %s for reading\n", argv[1]);		return 2;	}	// how long is this file?	fseek(in, 0, SEEK_END);	long size = ftell(in);	fseek(in, 0, SEEK_SET);	char *data = new char[size];	fread( (void*)data, 1, size, in);	fclose(in);	// construct file	MSCFBFFile File(data, size);	// do stuff	// clean up	delete data;	std::system("pause");}