Visual Studio 2010, Error C4430

Trying to find the average of n numbers, where n is part of the input.

Here is the first part of my code, it's still missing the calculations to find the average.

#include <iostream>
using namespace std;
main ()
{
int count = 0;
int x;
int sum = 0;
int n = 10;
double ave;

while ( count >= n)
{
cout << "Enter 10 numbers\n";
cin >> x;
sum = sum + x;
count++;
}

int i;
cin >> i;
return 0;
}

I identified n to be 10 so the user may submit 10 numbers as to finding the average.

However when i try to run the program, i get an error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Thanks in advanced.
You did not specify what type returns your "main" function.
How would i specify what type to return?
In this case type the following 4 letters before main():
int
Topic archived. No new replies allowed.