#include <string>
#include <iostream>

using std::string;
using std::cout;

class shape {
protected:
	string _type_name;
public:
	void draw() {
		if(_type_name == "triangle") {
			cout << "..drawing triangle..";
		} else if(_type_name == "circle") {
			cout << "..drawing circle..";
		} else {
			cout << "Error: type not recognized";
		}
	}
};

class triangle : public shape {
public:
	triangle() {
		_type_name = "triangle";
	}
};

int main() {
	shape *pobj = new triangle;
	pobj->draw();
	delete pobj;

	return 0;
}
