Pagini recente » Cod sursa (job #195871) | Monitorul de evaluare | Cod sursa (job #657592) | Istoria paginii runda/simulareoni11-12-round2/clasament | Cod sursa (job #245789)
Cod sursa(job #245789)
#include <stdio.h>
#include <fstream>
using namespace std;
long length;char * buffer;
int main(){
ifstream is;
is.open ("date.in",ios::in);
//freopen ("date.out","w",stdout);
// get length of file:
is.seekg (0, ios::end); length = is.tellg();
is.seekg (0, ios::beg);
// allocate memory:
buffer = new char [length];
// read data as a block:
is.read (buffer,length);
is.close();
//output file
//printf("%s",buffer);
//fclose(stdout);
return 0;
}