Can't compile this code
From: Morten Gulbrandsen (Morten.Gulbrandsen_at_rwth-aachen.de)
Date: 11/25/04
- Next message: Chris \( Val \): "Re: Can't compile this code"
- Previous message: Chris \( Val \): "Re: Can't compile this code:"
- Next in thread: Chris \( Val \): "Re: Can't compile this code"
- Reply: Chris \( Val \): "Re: Can't compile this code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 25 Nov 2004 11:29:51 +0100
#include <iostream>
public class Cat
{
private:
int weight;
int age;
void DoMeow()
{
cout << "Meow\n":
}
public:
Cat::Cat(int theWeight, int theAge)
{
weight = weight;
age = theAge;
}
void Meow(int howManyTimes)
{
for (int = i; i < howManyTimes; i++)
{
DoMeow();
}
}
}
int main()
{
Cat frisky = new Cat(5,3);
frisky.Meow(3);
}
Got it from here
http://www.libertyassociates.com/pages/Books.htm
http://www.libertyassociates.com/pages/files/TYCPP4eSource.zip
Please help,
Yours Sincerely
Morten Gulbrandsen
- Next message: Chris \( Val \): "Re: Can't compile this code"
- Previous message: Chris \( Val \): "Re: Can't compile this code:"
- Next in thread: Chris \( Val \): "Re: Can't compile this code"
- Reply: Chris \( Val \): "Re: Can't compile this code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|