Category : Files from Magazines
Archive   : CUJ9305.ZIP
Filename : 1105087A

 
Output of file : 1105087A contained in archive : CUJ9305.ZIP
// test conversions from derived to base using
// non-public base classes

class B
{
public:
int i;
};

class T : protected B
{
public:
void foo();
};

void T::foo()
{
T t;
B *p = &t; // ok, B accessible
}

class V : private B
{
public:
void bar();
};

void V::bar()
{
V v;
B &r = v; // ok, B accessible
}

int main()
{
T t;
V v;
B *p = &t; // error, B not accessible
// base of T
B &r = v; // error, B not accessible
// vase of V
return 0;
}




  3 Responses to “Category : Files from Magazines
Archive   : CUJ9305.ZIP
Filename : 1105087A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/