- 博客(11)
- 收藏
- 关注
原创 广义表相关算法
//Header.h#ifndef HEADER_H#define HEADER_H// 预定义常量和类型// 函数结果状态代码#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2typedef in
2010-04-03 21:15:00
826
原创 insert_sort
#include using namespace std;void insert_sort(int array[],int length){ int i,j,temp; for(i=1;i { temp=array[i]; for(j=i-1;j>=0&&array[j]>temp;j--)
2009-11-12 14:52:00
321
原创 ferror
/* ferror example: writing error */#include int main (){ FILE * pFile; pFile=fopen("myfile.txt","r"); if (pFile==NULL) perror ("Error opening file"); else { fputc (x,pFile);
2009-09-03 15:52:00
587
原创 Fcitx
Fcitx(Free Chinese Input Toy for X),小企鹅输入法http://www.fcitx.org/main/配置文件~/.fcitx/cofig[程序]显示字体(中)=AR PL KaitiM GB显示字体(英)=Courier New显示字体大小=12主窗口字体大小=12字体区域=zh_CN.UTF-8使用AA字体=1使用粗
2009-09-02 16:10:00
561
原创 cocktail sort
//cocktail sort#includeusing namespace std;void cocktail_sort(int list[],int list_length){ // the first element of list has index 0 int i; int bottom = 0; int top = list_length -
2009-08-23 22:38:00
440
原创 Bubble Sort
#include using namespace std;void bubbleSort(int array[],int size){ int m,n; for(m=0;m<size-1;m++) { for(n=0;n<size-m-1;n++) { if(array[n]>array[n+1
2009-08-23 22:12:00
242
原创 cstring
/* memchr */#include #include #include using namespace std;int main(){ char *pch; char str[]="Example string"; pch=(char*)memchr(str,p,strlen(str)); if(pch!=NULL) cout<<"p f
2009-08-20 23:38:00
370
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人