FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.benjamin / friend02.C
blobe9520e3ff60500203db784c6cef591e695300a66
1 // Build don't link:
2 //980610 bkoz
3 // example 2: ok
5 class bar;
6 class foo {
7 public:
8     int func(bar *);
9     foo(){}
10     ~foo(){}
13 class bar {
14   int st;
15 public:
16   bar(){st=12;}
17   ~bar(){}
18   friend int foo::func(bar *);
21 int foo::func(bar *obj) {
22   obj->st++;
23   return (obj->st);
26 void test02() {
27   foo obj_f;
28   bar obj_b;
29   
30   obj_f.func( &obj_b);