const引用的一个迷惑性问题
将数据以位制显示

应该记住的话

yichen posted @ 2014年7月03日 02:40 in Essay , 465 阅读
1.虽然栈是从高地址向低地址增长的,但数组总是从低地址向高地址排列的
2.void* 不能指向由const修饰的变量
3.如果一个指针变量被delete释放后,确保其被赋值为NULL,防止此指针变量变成野指针
4.绝对不能把一个整型值赋值给一个指针变量
5.不能对void*指针进行算术操作
6.禁止返回局部变量的地址或引用
7.一种有效解决数组溢出的方法:即通过数组最后一个元素自行决定数组是否结束
8.重复包含头文件有以下问题:
     1)使预处理的速度变慢了,要处理很多本来不需要处理的头文件
     2)如果有foo.h 包含bar.h ,bar.h 又包含foo.h 的情况,预处理器就陷入死循环了(其实编
译器都会规定一个包含层数的上限)
     3)头文件里有些代码不允许重复出现,虽然变量和函数允许多次声明(只要不是多次定义
就行),但头文件里有些代码是不允许多次出现的,比如typedef类型定义和结构体Tag定义
等,在一个程序文件中只允许出现一次
9.gcc中 int a; 为暂时定义,可与 int a = 2; 同时并存,而 g++ 貌似是定义,不允许 int a; 出现,报错重复定义了
10.如果提供了一个复制构造函数,编译器就不再生成默认构造函数了,所以当定义复制构造函数时,一定要定义构造函数
Avatar_small
AP SSC Evs Question 说:
2022年9月10日 20:48

Advised to everyone can contact the class teacher to get important questions for all lessons and topics of EVS. Every Telugu Medium, English Medium and Urdu Medium student of the State Board can download the AP 10th Class EVS Model Paper 2023 Pdf with answers for term-1 & term-2 exams of SA-1, SA-2 and other exams of the board. AP SSC Evs Question Paper Environmental Education is one of the most important subjects and it’s a part of Science. School Education Department and various leading private school teaching staff have designed and suggested the practice question paper for all Part-A, Part-B, Part-C, and Part-D questions of SA-1, SA-2, FA-1, FA-2, FA-3, FA-4 and Assignments.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter