search

Home  >  Q&A  >  body text

c++ - 请问怎样用构造函数的初始化列表对类内包含的对象(其他类)进行初始化?

怪我咯怪我咯2773 days ago373

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 14:32:59

    The pseudo code is as follows:
    Pirate(.....)

    : weapon_main(...)

    {
    }

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 14:32:59

    What does this mean? :

    Pirate(char* p1,int p2,int p3,char*p4,int p5,int p6):
    weapon_main(p1,p2,p3){}
    

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 14:32:59

    For details, please refer to: Initialization parameter list.

    reply
    0
  • Cancelreply