上一页 1 2 3 4 5 6 7 ··· 23 下一页
摘要: C++ & C Can you declare a C struct that looks like a C++ class and somehow call member functions? What is the difference between a parameter and an argument? Standard C/C++ Comparisons How c... 阅读全文
posted @ 2008-09-27 14:13 中土 阅读(761) 评论(0) 推荐(0) 编辑
摘要: C++ STL What is the time complexity of insertion in a map? If you have a vector of 100 elements, and you erase elements 20 through 55, what happens to the other elements? Why will you use vect... 阅读全文
posted @ 2008-09-27 13:22 中土 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: Ganymede RC3 XPCOM error -2147467262 https://bugs.eclipse.org/bugs/show_bug.cgi?id=213194 http://www.eclipsepowered.org/eclipse/forums/m92239944.html ~ >apt-get xulrunner Just adding: -Dorg.ecl... 阅读全文
posted @ 2008-09-26 20:03 中土 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 看下面程序片段: #include int main(){ int a=255; printf("%d\n", sizeof(++a)); printf("%d\n", a); return 0;} 结果: 4255 这个是我们已经熟知的:sizeof是编译期求值,所以sizeof中表达式根本不计算,而是只需要知道此表达式的类型就可以得到值 再看: #inclu... 阅读全文
posted @ 2008-09-21 01:28 中土 阅读(629) 评论(0) 推荐(0) 编辑
摘要: 标题中描述的内容是C语言中面临的最基本问题,这些是需要最先弄清楚的。 阅读全文
posted @ 2008-09-21 00:44 中土 阅读(892) 评论(0) 推荐(0) 编辑
摘要: 如下两个定义的差别: char amessage[] = "now is the time";char * pmessage = "now is the time"; amessage是一个足以存放字符串初值和空字符'/0'的一维数组。可以更改数组中的单个字符。但amessage本身是一个不可改变的常量,它总指向同一内存区。其类型为char * const pmessage是一个指针,其初值指向... 阅读全文
posted @ 2008-09-21 00:44 中土 阅读(899) 评论(0) 推荐(0) 编辑
摘要: C语言中,可以保证: 1. 所有函数都使用值传递:其实即使是指针,也是值传递。C++中引用传递归结到最后仍然是值传递 2. 实参到形参的参数传递过程其实是形参的初始化(!=赋值)过程。传递参数时做一些运算表达式,直接按赋值初始化理解 3. 形参的作用域是函数域,它和函数内定义的其他自动变量一样,并没有任何特殊性。 4. 函数形式参数带const限定符时,实参是可以成功传递的,这次传递相当于初始化。... 阅读全文
posted @ 2008-09-21 00:32 中土 阅读(3255) 评论(0) 推荐(0) 编辑
摘要: 一、赋值时带限定符问题(qualifier) 修饰符包括 const, static, ... 挑战你的极限,你看看哪些赋值编译器会报错/警告? 左值类型 右值类型 可否赋值 解释 普通类型之间赋值 char const char 是 const char 任何异己char 否 指针类型之间赋值 char * ... 阅读全文
posted @ 2008-09-19 15:34 中土 阅读(1148) 评论(0) 推荐(0) 编辑
摘要: 首先,让我们来回顾下你通常认为不值得一提的ASCII码表 ASCII码一般分为三个部分: Non printable, system codes between 0 and 31. Lower ASCII(Standart ASCII), between 32 and 127. This part of the table (as shown below) originates from ol... 阅读全文
posted @ 2008-09-17 16:13 中土 阅读(4299) 评论(2) 推荐(0) 编辑
摘要: #include #include int main(){ int arr[] = { 6, 7, 8, 9, 10 }; int *ptr = arr; *(ptr++) += 123; //printf("%d, %d, %d\n", *ptr, *(++ptr), *ptr);//8, 8, 7 //std::cout .::++-- Grouping o... 阅读全文
posted @ 2008-09-17 16:09 中土 阅读(743) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 23 下一页
©2005-2008 Suprasoft Inc., All right reserved.