What does the “::” mean in C++?

后端 未结 4 1817
花落未央
花落未央 2021-02-07 03:10

What does this symbol mean?

AirlineTicket::AirlineTicket()
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-07 03:42

    It declares a namespace. So in AirlineTicket:: you can call all public functions of the AirlineTicket class and AirlineTicket() is the function in that namespace (in this case the constructor).

提交回复
热议问题