
C
张晓鱼
先天不足,后天还不想努力...
展开
-
在指定文本文件中删除指定字符串C语言
#include #include #include #define STRLEN 1024char * replace(char str[], char temp[]){//将str中出现的字符串temp删除 char *p = strstr(str, temp); while(p != NULL){ int len = strlen(temp); for(p +=原创 2016-05-25 16:48:23 · 4928 阅读 · 0 评论 -
显示指定文件中出现在另一个文件中的所有句子
#include #include #include #define STRLEN 1024int main(int argc,char *argv[]){ if(argc != 2){//命令行参数错误 fprintf(stderr,"command error\n"); exit(-1); } FILE * searchf原创 2016-05-25 16:50:07 · 302 阅读 · 0 评论 -
Gcc在Windows下编写C语言
1.假设源文件名为test.c,生成的可执行文件文件名为test.exe,.gcc编译C语言命令为:gcc test.c -o test2.如果想在源文件中使用c99标准,编译命令为:gcc -std=c99 test.c -o test3.c99标准中的bool类型定义在头文件stdbool.h中翻译 2016-06-04 10:03:40 · 429 阅读 · 0 评论 -
第一个SDK程序
#includeint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd){/*单字节版本*/ MessageBoxA(NULL, "HelloWolrd!", "title", MB_OK); return 0;}/*1.使用的是单字节版本转载 2016-06-04 12:51:10 · 787 阅读 · 0 评论