I am just trying to make my own copy file command, and it doesnt seem to be working. Can someone help. With the attached code it only copies 7 bytes of the 56 byte picture (its a small picture). So whats up with this?
Code:
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main ( int argc, int argv[] )
{
ifstream indata;
ofstream outdata;
indata.open("note.gif",ios::in | ios::binary);
outdata.open("copy.gif",ios::out | ios::binary);
char send_msg[100];
indata.get(send_msg, 100);
outdata<<send_msg;
return 0;
}