语法
文章平均质量分 72
hackerwin7
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
gcc error: crosses initialization of XXX
可能你编译下面的代码会报错: 1 2 3 4 5 6 7 8 9 10 11 12 int main() { int i; switch (i) { case 3: int y = 0; break; default: break; } } g++ 编译: mai转载 2014-01-27 17:13:53 · 1661 阅读 · 0 评论 -
对二维字符数组排序(2sort和1qsort)
转自:http://www.cnblogs.com/submarine/archive/2010/04/22/1941254.html sort,用到了结构体 第一种sort: 282MS 代码 #includestdio.h>#includealgorithm>using namespace std;struct Array{ char dat转载 2014-01-30 16:11:54 · 2391 阅读 · 0 评论 -
用sort给字符串排序
转自:http://blog.sina.com.cn/s/blog_9159c90501016xer.html 按照字典序排序: c++版: string s[21]; for(int i=0;i >s[i]; sort(s,s+20);不用写cmp函数,string 类提供了operator。但这只是按照字典序排序的,按长度排序如下: 按长度排序: c++版: #in转载 2014-01-30 16:12:57 · 13602 阅读 · 0 评论 -
C语言面试笔试题
> 预处理器(Preprocessor) 1. 用预处理指令#define 声明一个常数,用以表明1年中有多少秒(忽略闰年问题) #define SECONDS_PER_YEAR (60 * 60 * 24 * 365)UL 我在这想看到几件事情: 1). #define 语法的基本知识(例如:不能以分号结束,括号的使用,等等) 2). 懂得预处理器将为你计算常数表达式的转载 2014-02-27 18:44:54 · 1477 阅读 · 1 评论
分享