C++
文章平均质量分 55
thefist11ee
这个作者很懒,什么都没留下…
展开
-
慎用CString::MakeUpper 和 MakeLower
这两个函数不支持扩展字符,Visual c + + 4.0 中还用这两个。在 Visual c + + 5.0,MakeUpper() 和 MakeLower() 函数使用 C 运行时 _tcslwr 和 _tcsupr 转换而不是中 CharUpper 和 CharLower原创 2011-09-21 14:03:48 · 1277 阅读 · 0 评论 -
应用程序配置不正确,程序无法启动
解决方法: 1. stdafx.h 加一个宏定义 #define _BIND_TO_CURRENT_VCLIBS_VERSION 1 2.copy VS的安装文件."Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86\"的"Microsoft.VC90.DebugCRT","Microsoft.VC90.DebugMFC","M原创 2012-03-07 22:33:01 · 366 阅读 · 0 评论 -
Windows游戏编程大师技巧(第二版)笔记-第一章
士不可以不弘毅,任重而道远。虽然我的编程水平不高,但是,完全可以通过学习积累得到提高。 仁以为己任,不亦重乎? 今天得下定决心学习了。 笔记开始: 1. 视频游戏,应当避免频繁调用高层的函数。 2. 使用全局变量以减少参数入栈出栈。 技巧二:使用内联函数, 缺点:编译后生成的程序更大(我还不是很理解) 3. 定义结构体,注意字节对齐。不如内存寻址会麻烦。Pentium CPU喜欢原创 2013-05-27 19:01:43 · 524 阅读 · 0 评论 -
c++ primer plus(一)数据类型
1. using namespace std; 名字空间既是引用哪个名字空间的函数 输入 cin>> nTemp; 2. short ,int long short == short int long == long int c++的标准: short 至少16bit int 至少与short一样长 long 至少与int一样长 1字节 == 8b原创 2014-05-26 17:26:18 · 408 阅读 · 0 评论 -
c++ primer plus(二)std
1. using namespace std; 名字空间既是引用哪个名字空间的函数 2. 输入 cin 得到一个int类型的变量 int nTemp; cin>> nTemp; cin获取字符串: char name[20] cin >> name; 有问题:lei fist 得到lei, 使用cin.getline则无问题 cin.getline(nam原创 2014-05-26 17:30:08 · 507 阅读 · 0 评论 -
c++ primer plus(chapter 7)const与函数地址
const int sloth =3 ; const int* ps; //一个指向const int的指针:指针指向一个常量对象, 可防止使用指针来修改所指向的值。 int* const finger = &sloth; //一个const指针,指向int: 指针本身声明为常量,可防止改变指针指向的位置。 eg. int age = 39 const int* pt = &age原创 2014-07-04 09:23:03 · 452 阅读 · 0 评论