|
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.
|