jteng2127
jteng2127

Reputation: 63

Using scope resolution operator to define mutiple class member function

Just for convenience, is there a way to turn this

class foo{
  public:
    void fun1();
    void fun2();
}

void foo::fun1(){
  //something
}

void foo::fun2(){
  //something
}

into something like this? (I know the code is invalid)

class foo{
  public:
    void fun1();
    void fun2();
}

foo::{
  void fun1(){
    //something
  }
  void fun1(){
    //something
  }
}

Upvotes: 3

Views: 110

Answers (0)

Related Questions