/* File : example.c */ #include "example.h" #define M_PI 3.14159265358979323846 template void Shape::move(T dx, T dy) { x += dx; y += dy; } template int Shape::nbshapes = 0; template int Shape::getNbShapes() { return Shape::nbshapes; } template T Circle::area() { return M_PI*radius*radius; } template T Circle::perimeter() { return 2*M_PI*radius; } template T Square::area() { return width*width; } template T Square::perimeter() { return 4*width; } template class Shape; template class Square; template class Circle;