Hi, I've got a simple command line program like this:
Code:
#include <iostream>
#include <fstream>
using namespace std;
int main () {
ofstream file;
file.open ("Test.doc");
file << "This is an image inserted into this file with C++!" << endl;
// Somehow insert an image below that line <-- dont know how
file << "This line was inserted after the image!";
file.close ();
cout << "Press ENTER to exit . . .";
cin.get ();
return 0;
}
What code can I put into that commented line to insert the picture into that file?
If your using a DOC file (ie., Microsoft Word) then I think the definition of the format is available. You might be able to find out how to create a DOC file here http://www.wotsit.org/.
that wasn't really helpful, when i write to the file like that, it saves it as plain text, but it can still support advanced features since it's a .doc file
i just need some function to copy and paste a picture in the file