error LNK1120: 1 unresolved externals
I try to run the following code which actually from a book ( C How to program by P.J.Deitel & H.M. Deitel) regarding arrays chapter.
Code:
#include <stdio.h>
int main ( void )
{
int n[ 10 ];
int i;
for ( i = 0; i < 10; i++) {
n[ i ] = 0;
}
printf("%s%13s\n", "Element", "Value");
for ( i = 0; i < 10; i++ ) {
printf("%7d13d\n", i, n[ i ] );
}
getchar();
return 0;
}
But when I try to run it, it will always produce 2 of the following errors.
1. error LNK2019: unresolved external symbol_WinMain@16 referenced in function____tmainCRTStartup
2. error LNK1120: 1 unresolved externals
Any idea?