问题描述:

This question already has an answer here:

  • What is this weird colon-member (“ : ”) syntax in the constructor?

    11 answers

网友答案:

It means that you are defining a constructor for class Server which is declared with one int parameter. The class has fields listen_sock which is being set to 0 and then current_autogen_nickname which is being set to 1

You are basically defining a constructor and using an initializer list.

相关阅读:
Top