You think? Here is my code.
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
DWORD vDrives;
vDrives = GetLogicalDrives();
if (vDrives == 0) { //GetLogicalDrives failed for some reason.
vDrives = GetLastError();
printf("Error Code %d\n", vDrives);
} else {
printf("GetLocalDrives : %d\n",vDrives);
}
return 0;
}
I'm using codeblocks as my IDE I created a console project and typed the above code.
On execution I get a system dialog informing me that App2 has stopped working. Selecting <Close the program> I get
Process returned -1073741819 (0xC0000005) execution time : 58.958 s
Press any key to continue.