class myClass; // Class declaration extern myClass x; // Declaration of a myClass variable // This will NOT reserve memory space, // so compiler do NOT need to know // the structure of myClass class yourClass { int a; friend myClass f1( myClass x ); // An address is passed to f1 // Compiler does not need to // know the structure // Declaration is sufficient information };