I tryed to make that exercice ( 7.3) for fun and I got 3 errors who I cannot solve.
THis is my code :
This is the errors :Code:#include <iostream>
using namespace std;
int main()
{
unsigned short small;
unsigned short large;
const unsigned short MAXSMALL=65535;
cout<<"Enter a small number: ";
cin >> small;
cout<<"Enter a large number: ";
cin >> large;
cout<< "Your small number is : " <<small<<"...";
while (small < large && large > 0 && small < MAXSMALL)
{
if (small % 5000 ==0)
cout<<".";
small++;
large-=2;
}
cout << "\nSmall: " << small << "\nLarge: " << large <<endl;
return 0;
}
Quote:
Configuration: LoopBaby - Win32 DebugCompiling...
loopWhile.cpp
Linking...
loopWhile.obj : error LNK2005: _main already defined in WHile.obj
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/LoopBaby.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
LoopBaby.exe - 3 error(s), 0 warning(s)
