error: 'for' loop initial declarations are only allowed in C99 mode
使用gcc编译代码是报出
error: 'for' loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 ...
分类:
其他好文 时间:
2014-09-24 23:35:17
阅读次数:
209
UVA586 - Instant Complexity(递归加模拟)
题目链接
题目大意:给你一段代码,要求你算复杂度。OP代表操作,Loop代表循环,end结束。
解题思路:递归去模拟。具体看代码。
代码:
#include
#include
const int N = 15;
char s1[N], s2[N];
typedef long long ll;
ll...
分类:
其他好文 时间:
2014-09-24 12:16:56
阅读次数:
179
在有网络的情况下安装gcc只需一条指令:yum install gcc 那么在没有网络的情况下该如何安装gcc呢?虽然没有网络,但是我想你应该有安装光盘或者ISO镜像了,如果这些也没有的话,那就。
假设你有这些吧,我们只需利用安装光盘或ISO镜像来挂载一个本地yum源,利用这个来安装gcc。
一:挂载yum源,我这里用的是ISO镜像 在终端输入指令:mount -o loop xxx...
分类:
其他好文 时间:
2014-09-23 18:50:36
阅读次数:
326
服务端处理1个客户端的例子运行结果:执行服务端进程:[root@localhost single_link]# ./server [server]: begin[server]: loop......[server]: client[127.0.0.138528] is connected[serv...
分类:
其他好文 时间:
2014-09-21 22:29:01
阅读次数:
289
while do done, until do done (不定循环)while [ condition ] $s"for...do...done (固定回圈)for 这种语法,则是『 已经知道要进行几次回圈』的状态!他的语法是:for var in con1 con2 con3 ...do...
分类:
其他好文 时间:
2014-09-20 18:44:59
阅读次数:
271
1,judgment in deciding(if...:,if..else:,if else...else:),loop(for...:,while True...:)break,continue;2,搞定python内置核心类型tuple(以下标数据序索引数据,元素不可更改),dict{与tup...
分类:
编程语言 时间:
2014-09-20 15:18:47
阅读次数:
276
Qt的signals/slots是可以用在线程间的。由于事件循环(event loop)是在主线程完成的,所以在非主线程发送一个信号时,对应的槽函数将会由主线程执行。
熟悉多线程的读者应该都感受到这里会有一个微妙的问题。如果signals/slots的函数参数是一个自己定义的类型。比如自己定义了一个Student类,信号函数为sendStudent(const Student &stu)...
分类:
编程语言 时间:
2014-09-19 12:06:35
阅读次数:
306
今天在现场的哥们发来异常,让我解决,错误信息如下:HTTP Status 500 - Read operation to server 192.168.1.110:20001 failed on database wpdb; nested exception is com.mongodb.Mongo...
分类:
数据库 时间:
2014-09-18 20:16:04
阅读次数:
330
http://entrian.com/goto/# Example 1: Breaking out from a deeply nested loop:from goto import goto, labelfor i in range(1, 10): for j in range(1, 20...
分类:
编程语言 时间:
2014-09-18 18:34:14
阅读次数:
235
error: 'for' loop initial declarations are only allowed in C99 mode
使用gcc编译代码是报出
error: 'for' loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to...
分类:
其他好文 时间:
2014-09-18 14:55:17
阅读次数:
241