A question about classes

I'v looked at a few examples of code involving classes, but there is one thing i do not understand, and can not find information about

Let me give a simple example;

1
2
3
4
5
6
7
8
9
10
11
class A
{
public:
void hello() {cout << "Hello";}
}

class B : public A
{
public:
void hi() {cout << "Hi";}
}


I think I'm missing something but I don't understand what public A is doing behind class B: public A
I mean, what is the use of that? What does it do? Basically, what would that mean and how do I use it? Thanks guys
Last edited on
Thank you very much, that helps.
Topic archived. No new replies allowed.