Help with Identifiying "count"

CODE : //Declare and initialize objects
double initial, increment, final, time, height, velocity, max_time(0), max_height(0);
int loops;

//Get user inputs
cout << "Enter initial value for table (in hours) \n";
cin >> initial;
cout << "Enter increment between lines in hours \n";
cin >> increment;
cout << "Enter final time (in hours) \n";
cin >> final;

//print report heading
cout << "\n\n Weather Balloon Information \n";
cout << "Time Height Velocity \n";
cout << "(hrs) (meters) (meters/s) \n";

// set formats

//Number of loops will be calculated
loops=(int)( (final - initial)/increment );
for (int count= 0; count<=loops; ++count);
if (height>max_height)
cout<<"\n Maximum balloon height was"<<setw(8)<<max_height<<"meters \n";
cout<<"and it happened at this time"<<setw(6)<<max_time<<"hours \n";
return 0;

PROBLEM : 1>------ Build started: Project: Project4, Configuration: Debug Win32 ------
1> Project4.cpp
1>c:\users\lauarius\documents\visual studio 2010\projects\test1\project4\project4\project4.cpp(42): error C2065: 'count' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
You're not showing your whole code. The problem here isn't shown in what you posted. The compiler says that there's something wrong with count on the 42nd line of your code.

Undeclared identifier would mean that it thinks count is supposed to be a variable, but you haven't declared it. You probably did a typo there and meant to use cout instead.
Topic archived. No new replies allowed.