use Inline 'C++';
 
my $obj1 = Person->new('riri', 12);
my $obj2 = Person->new('fifi', 11);
my $obj3 = Person->new('loulou', 10);
 
for my $obj ($obj1, $obj2, $obj3) {
	print $obj->get_name, " ",	$obj->get_age, "\n";
}
 
__END__
__C++__

class Person {
public:
	Person(char *name, int age);
	char *get_name();
	int get_age();
private:
	char *name;
	int age;
};

Person::Person(char *name, int age) {
	this->name = name;
	this->age = age;
}

char *Person::get_name() {
	return name;
}
 
int Person::get_age() {
	return age;
} 

