摘要: 单链表节点的查找查找单链表pos位置的节点,返回节点指针pos从0开始,0返回head节点node *search_node(node *head,int pos){node *p=head->next;if(posnext)==NULL){printf("incorrect position to search node\n");break;}}return p;} 阅读全文
posted @ 2014-05-08 20:53 ZhangAihua 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 计算单链表的长度计算单链表的长度,实现单链表的打印实现单链表的建立链表节点的定义:typedef struct node{int data;//节点内容node *next;//下一个节点}创建单链表node *Create(){int i=0;//链表中数据个数node *head,*p,*q;int x=0;head=(node*)malloc(sizeof(node));//创建头结点while(1){printf("input the data:");scanf("%d",&x);if(x==0)break;//Data为0时创建结束p= 阅读全文
posted @ 2014-05-08 20:39 ZhangAihua 阅读(2834) 评论(0) 推荐(0) 编辑
摘要: 实现单链表的建立链表节点的定义:typedef struct node{int data;//节点内容node *next;//下一个节点}创建单链表node *Create(){int i=0;//链表中数据个数node *head,*p,*q;int x=0;head=(node*)malloc(sizeof(node));//创建头结点while(1){printf("input the data:");scanf("%d",&x);if(x==0)break;//Data为0时创建结束p=(node*)malloc(sizeof(node 阅读全文
posted @ 2014-05-08 20:30 ZhangAihua 阅读(180) 评论(0) 推荐(0) 编辑
摘要: wxWidgets和Codeblocks的编译安装,GUI程序开发平台的搭建具体步骤如下:(1)基本编译环境安装安装编译工具(gcc之类)sudo apt-get install build-essential安装X11sudo apt-get install libx11-dev安装GTK需要的东西sudo apt-get install?gnome-core-devel(2)下载wxWidgets源码包并解压缩到 #{wxdir}(3)创建基于gtk和x11的编译目录${wx}mkdir ${wx}/buildgtkmkdir ${wx}/buildx11(4)编译wxgtkcd ${wx 阅读全文
posted @ 2014-05-08 09:45 ZhangAihua 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 1.#includeusing namespace std;int main(){ coutint main(){int k;char x;cout>k;vector a(k),b(k),c(k);cout>a;cout>b;L:cout>x;switch(x){case '+':c=a+b;break;case '-':c=a-b;break;case '*':c=a*b;break;case 'q':goto Z;default:cout>(istream &input,vector&am 阅读全文
posted @ 2014-05-06 10:50 ZhangAihua 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 1. 首先在StdAfx.h中添加以下代码引入数据库:#import "C:\\Program Files\\Common Files\\System\\ado\\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF")2. 然后再VC6.0或VS2012中:插入->类,弹出一个窗口,类名叫做CADOConn,基类选择Generic Class(切记)3. 然后在Class View中双击CADOConn, 阅读全文
posted @ 2014-04-30 16:38 ZhangAihua 阅读(487) 评论(0) 推荐(0) 编辑
摘要: vc++ 中ADO数据库的配置(Access2003-Access2007)1. 首先在StdAfx.h中添加以下代码引入数据库:#import "C:\\Program Files\\Common Files\\System\\ado\\msado15.dll" no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF")2. 然后再VC6.0或VS2012中:插入->类,弹出一个窗口,类名叫做CADOConn,基类选择Generic 阅读全文
posted @ 2014-04-30 16:28 ZhangAihua 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-04-16 11:24 ZhangAihua 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 历——智联招聘张爱华| 现居住于河南南阳党员 | 身份证:河南省南阳市长江路80号 473000183366----36(手机)E-mail: 6276@qq.comhttp://blog.csdn.net/u012388338求职意向·工作性质: 实习·期望职业: 软件工程师、高级软件工程师、用户界面(UI)设计、游戏设计/开发·期望行业: IT服务(系统/数据/维护)、计算机软件·工作地区: 北京、苏州、哈尔滨、天津、郑州·期望月薪: 2001-4000元/月·目前状况: 应届毕业生职业目标我最初的目标想做一名C++软件设计师,当 阅读全文
posted @ 2014-04-16 11:21 ZhangAihua 阅读(212) 评论(0) 推荐(0) 编辑
摘要: #include #include #include int main(){pid_t pid;int v = 0;pid = fork();if(pid < 0){printf("Error.");exit(-1);}if(0 == pid){v++;printf("id:%d, v=%d\n", getpid(), v);}else{v--;printf("id:%d, v=%d\n", getppid(), v);}printf("v=%d\n", v);return 0;return 0;} 阅读全文
posted @ 2014-04-16 11:18 ZhangAihua 阅读(352) 评论(0) 推荐(0) 编辑