?? dividewords.c
字號:
#include <stdio.h>#include "list/list.h"#include "common.h"#include <string.h>int main(char **avgs, int avgc){ List myList,*pList; FILE *fp; char c,buff[1024],*pb,c1[2]; pb = buff; pList = &myList; CreateList(pList); //printf("%s \n",*avgs); //getchar(); fp = fopen("text1.txt","r"); if(!fp) Error("open file error.\n"); *pb = 0; c1[1] = 0; printf(">> \n"); while(!feof(fp)) { c = fgetc(fp); if(strchr("\n\a\t ",c) > 0) { InsertListNode(pList->count,buff,pList); pb = buff; *pb = '\0'; } else if(strchr("~!@#$%^&*()+|`-=\\[{]};:'\",<.>/?",c) >0) { InsertListNode(pList->count,buff,pList); pb = buff; *pb = c; *(pb + 1) = '\0'; InsertListNode(pList->count,buff,pList); pb = buff; *pb = 0; } else { *(pb++) = c; *pb = '\0'; } } ShowListEntry(pList); getchar(); return 0;}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -