View Single Post
Old 08-18-2002, 10:46 AM   #1 (permalink)
w00t
Totally Inept
 
w00t's Avatar
 
Join Date: Jul 2002
Location: The Great Northwest
Posts: 195
w00t is on a distinguished road
Today's exercise in stupidity...

Code:
#include <iostream.h>

class Car
{
   public:
      int itsAge;
      int getAge();
      int itsCost;
      int itsRank;
      int itsModel();
      void start();
};
  	int Car::getAge()
{
		return itsAge;
}
	int Car::itsModel()
{
	cout <<"1990 Legacy";
}

	void Car::start()
{
     cout <<"RRR..Brumbrumbrummrumbrumbroooombroom...";
}



int main()
{
     Car Subaru;
     Subaru.itsAge = 11;
     Subaru.itsCost = 2900;
     Subaru.itsRank = 2;
     cout <<"My car is a" <<Subaru.itsModel() <<"/n";
     cout <<"it cost me" <<Subaru.itsCost <<"/n";
     cout <<"It's ranked #" <<Subaru.itsRank <<"/n";
     cout <<"Man, I love this car./n";

     return 0;
};
Error: line 20:
function should return a value.
__________________
Office Space:
Best Movie.
Ever.

Contrary to popular belief, the true function of a programmer
is to turn coffee into source code.
w00t is offline   Reply With Quote