volatile关键字 volatile关键字是一种类型修饰符,用它声明的类型变量表示可以被某些编译器未知的因素更改,比如:操作系统、硬件或者其它线程等。遇到这个关键字声明的变量,编译器对访问该变量的代码就不再进行优化,从而可以提供对特殊地址的稳定访问。使用该关键字的例子如下: int volati Read More
posted @ 2014-05-23 03:44
findumars
Views(502)
Comments(0)
Diggs(0)
记下以后所有碰到使用数组名称时候的是是非非: int main(int argc, char* argv[]) { char x[3]="abc"; // 编译错误 char a[3]={'a','b','c'}; char b[3]; b=a; // 常指针不能赋值 return 0; } Read More
posted @ 2014-05-23 03:37
findumars
Views(385)
Comments(0)
Diggs(0)
会记下所有C++类型转换的例子在这里:#include "stdafx.h"#include using namespace std;int main(int argc, char* argv[]){ cout<< 22/5*3 <<endl; // 输出12,注意连进位都没有包括 re... Read More
posted @ 2014-05-23 03:29
findumars
Views(320)
Comments(0)
Diggs(0)
以下三种情况皆错,都编译不过:int main(int argc, char* argv[]){ int a; int b[a];}int main(int argc, char* argv[]){ int a=4; int b[a];}int main(int argc, ... Read More
posted @ 2014-05-23 03:27
findumars
Views(531)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号