lulwut?
|:
So basically, the derived class only inherits things from the [php]private:[/php] part of the base class? Yet you need to declare the method in the [php]public:[/php] of the base class?
I guess i should speak in engrish
If i do
[php]class derived : private base[/php]
it only inherits things from the [php]private:[/php] of [php]class base[/php] Yet I need to declare the name of the methods in the [php]public:[/php] of [php]class base[/php] but i need to define the methods in [php]private:[/php] of [php]class base[/php]
moar understandable?

205
I'm not getting this.. are you asking a question or just stating something? That looks like something you can just try by yourself with your IDE. |:
Im asking.....
Well.
Alright. Will test in ide
No, that sets the most accessible class in your base class.
So, doing:
[php]public Polygon : protected Triangle
class Triangle {
public:
int Sides;
protected:
int Colour;
private:
bool _Hidden;
}
[/php]
would transform transform the variable (int) 'Sides' to protected, and retain the rest.

52
But what if i have something like this
[php]class ElectricMotor
{
public:
void StartMotor()
{
Accelerate();
Cruise();
}
void StopMotor()
{
cout << "motor stopped\n";
};
private:
void Accelerate()
{
cout << "accelerate\n";
}
void Cruise()
{
cout << "cruise\n";
}
};
class Fan : private ElectricMotor
{
public:
void StartFan()
{
StartMotor();
}
void StopFan()
{
StopMotor();
}
};
[/php]
未来が見えなくて怖いから
未来が見えてしまって悲しいから
目を閉じて優しい思い出に浸ってしまう
why bother with it? the private and public crap is just for ur ide, when compiled theres no difference in public and private functions >.>
Ah we-a blaze the fyah, make it bun dem!

52
Alright. solbed
request close
未来が見えなくて怖いから
未来が見えてしまって悲しいから
目を閉じて優しい思い出に浸ってしまう

52
Solbed is solbed mate.
I do duh code for duh game devving![]()
未来が見えなくて怖いから
未来が見えてしまって悲しいから
目を閉じて優しい思い出に浸ってしまう
~solved & locked~
Ah we-a blaze the fyah, make it bun dem!
NextGen1 (08-10-2010)