代码改变世界

Qt ----hello World

2016-07-10 10:37 by 慢跑的小菜, 141 阅读, 0 推荐, 收藏, 编辑
摘要:查看 ubuntu 和 Qt的版本 Qt的版本也可以在 Qtcreator上面查看 Qt的版本 可以到 https://www.qt.io/download/ 注册后下载 使用root权限安装后即可以使用。 #include <QCoreApplication>#include<QApplicati 阅读全文

一个调试信息和一个简单的带参打印输出函数

2016-05-29 22:04 by 慢跑的小菜, 256 阅读, 0 推荐, 收藏, 编辑
摘要:#include<stdio.h>#include<stdlib.h>int main(){ #ifdef DEBUG printf("Compiled: " __DATE__ " at " __TIME__"\n" ); printf("This is line %d of file %s\n", 阅读全文

一个简单的makefile示例

2016-05-29 18:01 by 慢跑的小菜, 358 阅读, 0 推荐, 收藏, 编辑
摘要:下面的程序从 Linux 程序设计第四版 引用 文件目录 2.c #include "a.h"#include "b.h"void function_two(){} 3.c #include "b.h"#include "c.h"void function_three(){}main.c #incl 阅读全文

GCC 常用参数含义

2016-05-29 16:13 by 慢跑的小菜, 1802 阅读, 0 推荐, 收藏, 编辑
摘要:-ansi 关闭 gnu c 中与 ansi c 不兼容的特性 , 激活 ansi c 的专有特性 ( 包括禁止一 些 asm inline typeof 关键字 , 以及 UNIX,vax 等预处理宏 -lxx 表示动态加载libxx.so库 -Lxx 表示增加目录xx,让编译器可以在xx下寻找库 阅读全文

C++ 测试系统允许分配的最大堆内存

2016-05-22 17:53 by 慢跑的小菜, 1249 阅读, 0 推荐, 收藏, 编辑
摘要:#include<stdio.h> #include<stdlib.h> unsigned int maxnum = 0; int main(){ unsigned int blocksize[3]={1024*1024,1024,1}; int i,count; for (i = 0; i < 3 阅读全文