I know how to download an html/txt page. For example :
//Variables DWORD dwSize = 0; DWORD dwDownloaded = 0; LPSTR pszOutBuffer; vector vFil
Merely opening the ofstream in binary mode does not change the way that the << operators work - they will always perfform formatted output. You need to use the stream's write() function, which does unformatted output.