On 3/24/07, Robert Ryan <[EMAIL PROTECTED]> wrote:
> I want to make a square, a circle and a triangle in C++
>    do I start off with just making generalizations about a Shape and then get 
> specific for each shape

And your question is...?

>
>    #include <iostream>
>  using namespace std;
>  class Shape {
>  double Diam = 0;

You cannot assign a default value to a member like this. You have to
use a constructor.

>    double Circum1 = 0;
>    double Circum2 = 0;
>    double Circum3 = 0;
>    }

Class definitions need to end with a semicolon.

>    public Square extends Shape {

This is not the C++ syntax of inheritance (maybe it's Java?).
Proper way:

Square : public Shape {

Those are just some syntax errors, I'm not going to make comments on
the correctness of your logic.
Please at least post syntactically correct snippets of code, along
with your questions.
The least you could do is to let your program through a compiler to
spot the obvious errors.

-- 
Tamas Marki

Reply via email to