I have to write an elevator simulation for an assignment using classes and what not and I'm having a bit of trouble. I've narrowed it down to my "for" statement in one of the classes isn't going up or down to the next level.
The real problem occurs here
void elevator::godown( int lowerfloor )
{
cout << "Starting at fl0or #" << currentfloor << endl;
int i = currentfloor;
for ( currentfloor; i == lowerfloor; i --)
cout << "Going down -- now at floor #" << i << endl;
cout << "Welcome to floor #" << i;
}
void elevator::goup( int higherfloor )
{
cout << "Starting at flo0r #" << currentfloor << endl;
int x = 0;
for ( x = currentfloor; x == higherfloor; x++){
cout << "Going up -- now at floor #" << x << endl;}
cout << "Welcome to floor #" << x;
}
whatever floor I put for the current floor it just outputs: