Study Notes (01): C ++ Start Basics video succinctly - declare and initialize variables

Learning immediately: https://edu.csdn.net/course/play/9598/204695?utm_source=blogtoedu

int a = 0; // assignment, in fact, is first initialized and then do an assignment

int b {1}; // initialize, more efficient as compared to the above

 

When the built-in types initialized with a list initialization method, and the initial value of the risk of losing information, the compiler will complain

Released five original articles · won praise 0 · Views 148

Guess you like

Origin blog.csdn.net/dollyandkalin/article/details/104384859