What is the difference between Initializing and Assignment inside a constructor?
2014-10-10 16:22
489 查看
http://stackoverflow.com/questions/1711990/what-is-this-weird-colon-member-syntax-in-the-constructor
Foo(int num): bar(num) This construct is called a Member Initializer List in C++. Simply said, it initializes your member barto a value num. Member Initialization: | |
相关文章推荐
- What is the difference between Constructor and ngOnInit?
- What is the difference between procedural and nonprocedural language?
- What is the difference between AWT and SWT?
- what is the difference between the setTimeout and setInterval
- What is the Differences Between Sleep/Standby and Hibernate
- What is the difference between XML and C or C ?
- What is the difference between User Control and Custom Control?
- What is the difference between OCCURS n and INITIAL SIZE n?
- What is the difference between user level threads and kernel level threads?
- macro与inline的区别 What is the difference between macro and inline?
- What is the difference between ContentPresenter and ContentControl?
- What is the difference between SMOD and CMOD?
- What is the difference between data mining and machine learning?
- 进程与线程的区别 What is the difference between process and thread
- What is the difference between '/n' and '/r/n'? /n /r/n的区别是什么
- What is the difference between Binding and TemplateBinding?
- What is the difference between a thread and a process?
- What is the difference between CollectionView and CollectionViewSource?
- What is the difference between a pack slip and a pick slip?
- What is the difference between a von Neumann architecture and a Harvard architecture?