maybe i'm complete idiot but i really can't see what's wrong with this:
Code:
ifstream fin("data.pdf");
ofstream fout("bleah.pdf");
fin.seekg (0, ios::end);
int length = finc.tellg();
fin.seekg (0, ios::beg);
for(int i=0;i<length;i++){
fout.put(fin.get());
}

