Public feed #890091

Miscellany

public text v1 · immutable
Raw Edit
·published 2008-02-03 13:32 UTC
rendered paste body
#ifndef fileio_hpp__
#define fileio_hpp_

#include <cstdio>

class FileIO
{
private:
	FILE *pFile;
public:
	bool ReadFile(int iAmount,char *cpFileName,char *cpDataBuffer);
};


bool FileIO::ReadFile(int iAmount,char *cpFileName,char *cpDataBuffer)
{
	fopen_s(&pFile,cpFileName,"r");
	if(cpFileName == NULL)
		return false;
	else
		fgets(cpDataBuffer,iAmount,pFile);
	return true;
}

#endif