Hi, I'm kind of new to C++, but not to programming in general. I'm trying to run a program that will download a file, but I'm getting errors at lines 9 and 12.
Code:
#include <iostream>
#include <string>
#include <windows.h>
int Url(LPCTSTR szURL, LPCTSTR szFileName){
HRESULT URLDownloadToFile(
LPUNKNOWN pCaller,
LPCTSTR szURL,//URL
LPCTSTR szFileName,//Save file
DWORD 0,/ERROR 1
LPBINDSTATUSCALLBACK lpfnCB
);
if (HRESULT == "S_OK") {//ERROR 2
return 1;
}
}
int WINAPI
WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLine, int iCmdShow)
{
int n = Url("http://google.com/","g.html");
return 0;
}
I'm just trying to simplify the API to get used to using functions. Any help would be appreciated!