here is my error: LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/hw07.exe : fatal error LNK1120: 1 unresolved externals
The program will build but when I try to run it I get that error.
Problem:
Write a void function that reads in a specified number of float values and returns their average. A call to this function might look like
GetMeanof (5, mean)
where the first argument specifies the number of values to be read, and the second argument contains the results. Document the data flow of each parameter with /* in */, /* out */, or /* inout */.
here is what I have so far. what does this error mean?
thanks
Bryan
Code:#include <iostream> using namespace std; void GetMeanOf(int count, float mean) int main() { int totalNumber = count; float num1; float num2; float num3; float num4; float num5; float sum; { cout << "Enter 5 numbers: "; cin >> num1 >> num2 >> num3 >> num4 >> num5; } { sum = num1 + num2 + num3 + num4 + num5; count++; } mean = sum / totalNumber; cout << "Average is " << mean << endl; }