Commit fb3ad9b3 by Benjamin Kosnik

friend test

From-SVN: r21442
parent e674dda9
// Build don't link:
//980610 bkoz
// example 1: buggy
class foo {
public:
class bar;
int func(bar *);
class bar {
int st;
public:
bar(){st=12;}
~bar(){}
friend int foo::func(bar *);
};
foo(){}
~foo(){}
};
int foo::func(bar *obj) {
obj->st++;
return (obj->st);
}
void test02() {
foo obj_f;
foo::bar obj_b;
obj_f.func( &obj_b);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment