Hello,
I am trying to execute the following program and I get an error. The error says that 'main' must return 'int'. I tried adding return 0 both within the main brackets and in the inner brackets but I still get the error. Can someone help? (this is an example from a textbook I am using!)
//example 04-11 - using random functions
#include <iostream>
#include <ctime>
using namespace std;
void main(void)
{
int i,j;
srand( (unsigned)time( NULL));
/*Display 10 numbers. */
for (i = 0; i < 10; i++)
{
j = rand();
cout << j << endl;
}