I have this question about c++ class access modifiers. If I have a basic class, let say it looks like this:
class A
{
public:
int a1;
private:
int a2;
}
If i create another class, called C that has public access from class A, then the variable a1 will be public for class C. If the access is private, then the a1 will be private for class C, but if class C has protected access from class A, then a2 will be private for class C. My question is if I create class C:
class C: private A
{
public:
int c1;
private:
int c2;
}
then I have private a2 in class C, but is the variable a1 from class A going to be public variable for class C?