刘华世的官方博客
上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: ////////////////////////////////////////////////////////////////// File: getfileversion.cpp// Description: 获取EXE文件的属性详细信息// Created: 2012-10-18// Author: lhsbqb/////////////////////////////////////////////////////////////////*The following code shows how to get FILEINFO value from resource file.Thes 阅读全文
posted @ 2012-10-18 17:40 pythonschool 阅读(1757) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>main(){ FILE *fp; int num=0,i; char c,str1[100]; printf("input string endwith enter:\n"); gets(str1); fp=fopen("lhsbqb.txt","w"); if(fp==NULL){printf("File open faild!");exit(0);} for(i=0;str1[i]!='\0';i 阅读全文
posted @ 2012-10-18 12:53 pythonschool 阅读(413) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>main(){ FILE *fp; char c; fp=fopen("lhsbqb.txt","w"); if(fp==NULL){printf("file open faild!");exit(0);} for(c='a';c<='z';c++) { fputc(c,fp); } fclose(fp); printf("字每添加完成"); getchar();}http://w 阅读全文
posted @ 2012-10-18 12:51 pythonschool 阅读(238) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>char *fdl(char *str){ char *q=NULL,*p;/*q就是所找字符的指针,找之前其值为NULL */ for(p=str;p!='\0';[++) if(*p>='a' && *p<='z'){q=p;break;} return q;/*将所求的指针返回*/}main(){ char ps[30]; char *x; x=fdl(ps); if(x!=NULL) { printf("The first chr is %c\n&quo 阅读全文
posted @ 2012-10-18 12:50 pythonschool 阅读(284) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>void dia(int a[], int n)/*数组传的其实是地址*/{ int i; for(i=0;i<n;i++) { if(a[i]%2==0) a[i]*=2; else a[i]*=3; }}main(){ int x[8]={11,12,13,14,15,16,17,18},i; dia(x,8); for(i=0;i<8;i++)printf("%3d",x[i]); getchar();}http://www.pythonschool.com/python/10.htm... 阅读全文
posted @ 2012-10-18 12:48 pythonschool 阅读(3646) 评论(0) 推荐(0) 编辑
摘要: getch功 能 在windows平台下从控制台无回显地取一个字符,在linux下是有回显的。用 法 int getch(void); 在linux平台下时(即包含的是curses.h),还应该在使用函数之前使用initscr(),使用完毕之后调用endwin().否则的话不需输入就会返回。 #include <stdio.h> #include <curses.h> //linux 下 #include <conio.h> //window 平台 int main(void) { char ch; initscr();//linux 下 printf(&q 阅读全文
posted @ 2012-10-18 12:46 pythonschool 阅读(868) 评论(0) 推荐(0) 编辑
摘要: #define STRICT 的意思是让编译器进行严格类型检查 #define WIN32_LEAN_AND_MEAN 的意思是让编译器去除不经常用的头文件(一般包含windows.h要包含一堆用不到的头文件) _T("...")是为了兼容宽字符和UNICODE###通过查看 头文件得知WIN32_LEAN_AND_MEAN和STRICT 的作用是决定在编译的时候是否加载多余的头文件 是一种优化宏#ifndef WIN32_LEAN_AND_MEAN#include <cderr.h>#include <dde.h>#include <ddem 阅读全文
posted @ 2012-10-18 12:41 pythonschool 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 例如输入:0 3 5 7 -1input:0123456789output:0123567程序分析:输入两段字串间隔如:(0 3) (5 7) -1是结束符/*** This program reads input lines from the standard input and prints** each input line, followed by just some portions of the lines, to** the standard output.**** The first input is a list of column numbers, which ends w 阅读全文
posted @ 2012-10-18 12:35 pythonschool 阅读(279) 评论(0) 推荐(0) 编辑
摘要: #include <time.h>#include <stdlib.h>#include <stdio.h>#include <conio.h>main(){ char c; clock_t start, end; time_t a, b; double var; int i, guess; int YY; srand(time(NULL)); printf("do you want to play it.('y' or 'n') \n");loop: while((c=getchar()) = 阅读全文
posted @ 2012-10-18 12:28 pythonschool 阅读(654) 评论(0) 推荐(0) 编辑
摘要: 当你运行一个C程序,出现This system does not support fullscreen mode.Choose 'Close' to terminate the application.是由于win7下已经不支持16位DOS全屏运行了您的WIN7系统无法支持该程序的全屏模式,因此建议您窗口化运行该程序,可以靠游戏窗口化工具实现其中之一的解决方法:一.下载 DOSBox 0.73http://sourceforge.net/projects/dosbox/files/dosbox/0.73/DOSBox0.73-win32-installer.exe/downlo 阅读全文
posted @ 2012-10-18 12:20 pythonschool 阅读(8301) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页
刘华世的官方博客