So I've ran through the code, and from my knowledge, it should all make sense to the compiler, yet I have another pair of errors.
Code:
void DownloadUpdates(void *file)
{
int j;
for(j = 0; j < num_files; j++)
{
SendMessage(hwndpb, PBM_SETPOS, 0, 0);
DownloadFile((struct*)file[j].name, (struct*)file[j].outName); //ERRORS ARE HERE
//DownloadFile((*file)[j].name, (*file)[j].outName);
}
}
DWORD WINAPI CheckForUpdate(void *file)
{
GetProgVersion();
num_files = GetUpdate();
SendMessage(hwndpb, PBM_SETRANGE, 0, MAKELPARAM(0, 200 ));
if(version.major > curVer.major || version.minor > curVer.minor || version.build > curVer.build)
{
int ret = MessageBox(hWnd, "An update is available to download. Would you like to download it?", "Update Available", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON1);
if(ret == IDNO)
return 2;
DownloadUpdates((void*)file);
return 0;
}
else
MessageBox(hWnd, "No updates are available to download.", "No Updates Available", MB_OK | MB_ICONINFORMATION);
return 1;
}
Errors
Code:
1. expected primary-expression before "struct"
2. expected `)' before "struct"
These 2 errors both occur here:
Code:
DownloadFile((struct*)file[j].name, (struct*)file[j].outName);
Am I casting the file structure correctly?