Get the App
SLTechnology News&Howtos  ›  Servers  › 

The difference between the initial value {} and () of Category 11

Shulou Source: shulou.com Published: 2022-06-03 09:26:55 09月27日 Update

# include # include using namespace std;/* * default values for member variables of class A1 objects; * / B1 initial value column std::initializer_list * B2 uses the initial value column initializer_list * / class Hello {char* hello = 0; default values for member variables of class A1 objects; public: ~ Hello (); Hello (const char* h); Hello (const char* hmoment Const char* j) Hello (std::initializer_list); / / B1 initial value column Hello (const Hello & obj);}; Hello::Hello (const Hello & obj) {cout

Tags: Objects variables members functions users types Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS Redmi Shulou Information Xiaomi