C++ Primer(第五版)读书笔记 & 习题解答 --- Chapter 2(三)

2015-01-27 06:14:56 · 作者: · 浏览: 35
s Section 2.4.4?
Q_1. Is the following code legal or not? If not, how might you make it legal?
?
A_1.?
?
int null = 0, *p = null; // 非法,不能用整型变量null来初始化指向整型变量的指针p
?
// 修正:
int null = 0, *p = &null;
?