摘要: 汉诺塔分析 阅读全文
posted @ 2017-03-16 13:40 lanshanxiao 阅读(971) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 #define TSIZE 45 5 6 struct film { 7 char title[TSIZE]; 8 int rating; 9 struct film *n 阅读全文
posted @ 2016-12-04 16:34 lanshanxiao 阅读(2673) 评论(0) 推荐(0) 编辑
摘要: 《C Primer Plus》中文版 第六版 从网站上搜索到这本书适合初学者而且是自学者可以看的C语言书籍,于是上网买了一本。 真是物有所值,通过本书我很系统的学习了一遍C语言,书中代码很少有错误(有些错误是因为编辑器不支持)。 本书中的知识点很全面而且详细,阅读本书的同时最好要将代码运行一遍,对于 阅读全文
posted @ 2016-11-04 20:47 lanshanxiao 阅读(1955) 评论(0) 推荐(0) 编辑
摘要: 1 /*2048*/ 2 3 #include<stdio.h> 4 #include<stdlib.h> 5 #include<conio.h> 6 #include<time.h> 7 8 void print(void);/*显示游戏界面*/ 9 int add(void);/*对中间变量数组 阅读全文
posted @ 2016-11-04 18:08 lanshanxiao 阅读(862) 评论(3) 推荐(1) 编辑
摘要: undefined reference to `WinMain@16'| 运行程式的时候出现了这样的错误,而且编译器也没有提示是哪一行出错: 经过百度搜索,发现了问题所在: 上面的图中main()函数写成了mian,编译器提示的错误是:没有发现main()函数。 阅读全文
posted @ 2016-10-22 14:57 lanshanxiao 阅读(196) 评论(0) 推荐(0) 编辑
摘要: error: too few arguments to function 'imax'| 运行上面的代码,产生了下面的错误: 中文翻译是:函数imax()中的参数太少。 查看imax()函数声明,发现imax()有两个参数,这就是编译器报错的原因。 在调用imax()函数的时候,少写了一个参数。 阅读全文
posted @ 2016-10-21 21:46 lanshanxiao 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 这个程序是《C Primer Plus 中文版 第六版》书上198页的代码,是一个值的琢磨的程式。 有时间可以看一看: 尤其是下面这几句代码,很精妙: 用了很短的程式,得出了最大值和最小值。 阅读全文
posted @ 2016-10-21 13:04 lanshanxiao 阅读(255) 评论(0) 推荐(0) 编辑
摘要: error: invalid preprocessing directive #difine| 无效的宏定义处理 宏定义define 写成了 difine。 阅读全文
posted @ 2016-10-19 14:43 lanshanxiao 阅读(283) 评论(0) 推荐(0) 编辑
摘要: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token| 遇到这种情况,不要看这里显示了三个错误,就很着急。静下心来,我们一条一条的找错误。 首先,第5行有错,错误是在‘{’左大括号前少了一个标点符号,这个标点 阅读全文
posted @ 2016-10-18 22:54 lanshanxiao 阅读(303) 评论(0) 推荐(0) 编辑
摘要: warning: implicit declaration of function 'pirntf' [-Wimplicit-function-declaration]| 这种警告是因为使用了 没有声明的函数:隐式声明的函数,仔细看一下警告发现printf()函数,不小心打错了写成了pirntf,所 阅读全文
posted @ 2016-10-18 21:51 lanshanxiao 阅读(173) 评论(0) 推荐(0) 编辑