随笔分类 -  C++ 语法

摘要:[代码]VC6.0 调试 阅读全文
posted @ 2009-11-14 20:02 谭志宇 阅读(442) 评论(0) 推荐(0) 编辑
摘要:#include void comb(int n, int curr, int d, int * sol) { if (curr == d) { int i; for (i = 0; i = 1; --i) { sol[curr] = i; comb(i-1, curr+1, d, s... 阅读全文
posted @ 2009-02-19 17:20 谭志宇 阅读(180) 评论(0) 推荐(0) 编辑
摘要:#include #include using namespace std; vector::iterator find(vector& source, int num) { vector::iterator begen = source.begin(); vector::iterator end = source.end(); while (begen != end) { ... 阅读全文
posted @ 2009-02-16 11:55 谭志宇 阅读(149) 评论(0) 推荐(0) 编辑
摘要:#include #include char* strcat(char* a, const char* b) { assert(a != NULL && b != NULL); char * str = a; while ( *str++ != '\0' ) NULL; str--; while ( (*str++ = *b++ ) != '\0') NUL... 阅读全文
posted @ 2009-01-22 12:36 谭志宇 阅读(177) 评论(0) 推荐(0) 编辑
摘要:1:C和C++有什么区别: C++支持面向对象的编程,同时兼容C语言的面向过程编程 2:VB和C++有什么区别: VB是一门基于对象语言,有对象和类的概念,但是对于继承、多态实现的不好 3:VC和C++有什么区别: VC可以看成是C++加上MFC基础类库的组合 4:声明一个引用是需要注意什么,函数返回引用时需... 阅读全文
posted @ 2009-01-22 11:26 谭志宇 阅读(414) 评论(0) 推荐(0) 编辑
摘要:#include using namespace std; int fun(int a) { return a; } typedef int(*funname)(int a); //对照DELPHI // type // funname = function(a: integer): int; // //函数指针数组 //typedef // int(*funarray[3]... 阅读全文
posted @ 2009-01-21 23:28 谭志宇 阅读(232) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示