hi i have a problem with this example that i copy online and is not working can someone help me
Code:
#include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
class person
{
public:
int age;
person(int age){ this -> age =age;}
};
class basketballplayer:public person
{
public:
int point;
int steal;
basketballplayer(int point, int steal, int age):person(age)
{
this -> point = point;
this -> steal = steal;
};
};
main()
{
basketballplayer tony; //why is this not working
tony.age=11;
getch();
}