
c++
sczbq1
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
扫雷游戏中求当前点四周雷的个数
#include #include #define NUM_MINE 20 //20行 20 列 using namespace std; struct Mine{ int state ; //等于1表示是雷 int num; //保存周围雷的个数 }; Mine mines[NUM_MINE][NUM_MINE]; int main() { int i,j,k,l; int row,co原创 2013-01-09 18:11:14 · 826 阅读 · 1 评论 -
纹理映射
1.载入图像 AUX_RGBImageRec *LoadBMP(char* Filename) { File *file = NULL; if(!Filename) { return NULL; } file = fopen(Filename,"r"); if(!file) { fclose(file) return auxDIBImageLoad(Filename);原创 2013-01-10 17:48:40 · 328 阅读 · 0 评论 -
初始化列表与构造函数中的赋值语句
在c++中构造函数分为初始化阶段和普通的计算阶段 #include using namespace std; class A { const int m; int n; public: A():m(1){ cout<<m<<endl; } }; int main(int argc, char* argv[]) { A a; return 0; } 运行结果为: 1原创 2013-02-28 22:47:05 · 304 阅读 · 0 评论 -
隐式类型转换
什么是隐式类型转换#include #include using namespace std; class Person { public: Person(const string& n){ name=n; cout<<"convert constructor used"<<endl; } private: string name; }; void f(Person s){ } i原创 2013-02-28 23:09:18 · 328 阅读 · 0 评论