摘要: 转眼就毕业三年多了。。。 由当初对社会的激情,现在也慢慢变成工作中的“老油条”了,感觉自己就像温水中的青蛙,没有危机感,没有年轻人该有的上进心。。。 最近些天,想着买房子,想着成家了,才发现业未立。。。 发现有好多可以学习的东西,等待我学习的东西。我不知道现在我从新学习编程是干嘛,没有说要... 阅读全文
posted @ 2015-01-26 12:38 sunlit 阅读(610) 评论(0) 推荐(0) 编辑
摘要: 全局变量全局变量定义在函数外面的变量是全局变量全局变量具有全局的生存期和作用域它们与任何函数无关在任何函数内部都可以使用它们#include int f(void);int gAll = 12;int main(){ printf("gAll in %s function is %d\n",_... 阅读全文
posted @ 2015-04-12 17:19 sunlit 阅读(678) 评论(0) 推荐(0) 编辑
摘要: 一个简单的EGE程序:#include "graphics.h" //EGE库的头文件 int main(int argc, char** argv) { initgraph(320,240); //初始化绘图窗口 outtextxy(20,120,"Aloha Wor... 阅读全文
posted @ 2015-04-06 10:58 sunlit 阅读(1455) 评论(0) 推荐(0) 编辑
摘要: 准备工作:1>Dev-C++ 5.10版本 系统 Win XP/WIN 7 2>下载EGE图形库“ege-13.04.02-full”!,关于本次配置的Dev-C++的信息见如:现在开始配置:1,解压“ege-13.04.02-full”到任一个文件夹,如C:/ege2,在解压后的文件中有... 阅读全文
posted @ 2015-04-06 00:05 sunlit 阅读(9174) 评论(0) 推荐(0) 编辑
摘要: #include //预处理 注意:iostream不带.hint main(){ std::cout //预处理 注意:iostream不带.h /*名字空间-namespace*/using namespace std; //定义以后,下面程序可以直接使用 int mai... 阅读全文
posted @ 2015-04-05 22:30 sunlit 阅读(311) 评论(0) 推荐(0) 编辑
摘要: #include "node.h"#include#include//typedef struct _node {// int value;// struct _node *next;//} Node;int main(int agrc,char const *argv[]){ i... 阅读全文
posted @ 2015-04-04 13:26 sunlit 阅读(223) 评论(0) 推荐(0) 编辑
摘要: #ifndef _ARRAY_#define _ARRAY_typedef struct { int *array; int size;} Array; //此处定义结构数据类型 Array,虽然下面很多传递函数需要指针,但是如果定义成*Array,那么在函... 阅读全文
posted @ 2015-03-31 22:53 sunlit 阅读(1174) 评论(0) 推荐(0) 编辑
摘要: 一、类型定义 C语言自定义数据类型 (typedef) C语言提供一个叫做typedef的功能来声明一个已有的数据类型的新名字。 typedef int Length; 使得Length成为int类型的别名。 这样,Length就可以替代int出现在定义变量和声明函数的... 阅读全文
posted @ 2015-03-29 10:59 sunlit 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 结构体定义三种方式: 1 #include 2 //第一种定义方法 3 struct point { 4 int x; 5 int y; 6 }; 7 struct point p1,p2; ... 阅读全文
posted @ 2015-03-27 22:01 sunlit 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 字符串函数 需要包含头文件#include strlen strcmp strcpy strchr strstr strcasestr 阅读全文
posted @ 2015-03-25 21:05 sunlit 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 枚举枚举是一种用户定义的数据类型,它用关键字enum以如下语法格式来声明: enum 枚举类型名字 {名字0,名字1,。。。,名字n};枚举类型名字通常并不真的使用,要用的是大括号里面的名字,因为它们就是常量符号,它们的类型是int,值则依次从0到n。 如:enum color{red,yell... 阅读全文
posted @ 2015-03-24 21:47 sunlit 阅读(1970) 评论(0) 推荐(0) 编辑