-4

Is there a compiler option that will allow the following code to compile, without moving the function definition to the bottom?

class first{
    int a;

    void func(second b){}

};

class second{
    int a;

    void func(first b){}
};

1 Answers1

0

Nope, not when you pass it by value. If you passed it by pointer or by reference you could.

Bill Lynch
  • 80,138
  • 16
  • 128
  • 173