diff options
Diffstat (limited to 'Examples/guile/class/example.cxx')
-rw-r--r-- | Examples/guile/class/example.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Examples/guile/class/example.cxx b/Examples/guile/class/example.cxx index 1e8e203dd..046304519 100644 --- a/Examples/guile/class/example.cxx +++ b/Examples/guile/class/example.cxx @@ -1,4 +1,4 @@ -/* File : example.c */ +/* File : example.cxx */ #include "example.h" #define M_PI 3.14159265358979323846 @@ -11,18 +11,18 @@ void Shape::move(double dx, double dy) { int Shape::nshapes = 0; -double Circle::area(void) { +double Circle::area() { return M_PI*radius*radius; } -double Circle::perimeter(void) { +double Circle::perimeter() { return 2*M_PI*radius; } -double Square::area(void) { +double Square::area() { return width*width; } -double Square::perimeter(void) { +double Square::perimeter() { return 4*width; } |