Hi All,
I am trying to write a small program to better understand and practise writing blocks of code, I have written the one below but get the error message :
"Linker Error undefined reference to WinMain@16
ld returned 1 exit status"
// This program demonstrates a block of code
#include <iostream>
using namespace std;
int main() {
double result, n, d;
cout << "Enter Value: ";
cin >> d;
// The target of this is the entire block.
if(d != 0) {
cout << "d does not equal zero so division is OK" << "\n";
result = n / d;
cout << n << " / " << d << " is " << result;
}
cin.ignore(1024, '\n');
cin.get();
return 0;
}
can anyone tell me where I am going wrong.
Thanks
John