January 1st, 2014, 03:55 AM
File handling in c++ of files having .docx,pdf or .exe extension.
The question I have is that I want to create a file with any file format uptill .txt and wordpad this code is Ok, Butt when I try it for .docx or .pdf or .exe files the error occures in opening new created file.
I means that while opening the older test.docx it open as in routine while opening newly created .docx or others, an error occurs that "Word found unreadable content in file".
and in case of .exe file the error occured is "The version of file is not compatible with window you are running ".
The program is terminated successfully and the size of new file obtained is similar to previous one from where we read the problem comes in opening new file
The code I tried is:
using namespace std;
while ( !in.eof() )
Any help is appreciated.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.