摘要: #include #include #include #define N 10FILE *p;int i;char name[255];char username[255];void gnrate(char *path){ for(i=1;i<N;i++){ char PATH[255]; memcpy(PATH,path,255); sprintf(name,"%d",i); strcat(name,"some.exe"); strcat(PATH,name); p=fopen(PATH,"w"); ... 阅读全文
posted @ 2014-03-30 17:11 xzenith 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;typedef struct{ int x,y; int step;}V;queue q;char map[100][100];int vis[100][100];int main(){ int i,j,n,m,x,y,cnt,num; V begin,end,tag,tag1; num=1; while(1) { scanf("%d%d",&m,&n); gets(map[0]); if (n==0 && m==0... 阅读全文
posted @ 2014-03-30 10:09 xzenith 阅读(134) 评论(0) 推荐(0) 编辑
摘要: //http://blog.sina.com.cn/s/blog_80a11dd70100vaxv.html#include void main(){ int data[50]; //存储位数的数组 int digit; //数据位数变量 120为三位 int i,j,k,r; //循环计数变量 int N; //输入的值 for(i=1; i10) {//进位 for(r=1; r10) digit++; //当数组中的值大于10则位数加1 data... 阅读全文
posted @ 2014-03-30 08:58 xzenith 阅读(182) 评论(0) 推荐(0) 编辑
摘要: #includevoid swap(int *a,int *b)//传地址相当于传了真值{ int temp;//而传值在函数结束时销毁 temp=*a; *a=*b; *b=temp;}void main(){ int a=2,b=3; swap(&a,&b); printf("a=%d, b=%d",a,b);} 阅读全文
posted @ 2014-03-30 08:25 xzenith 阅读(183) 评论(0) 推荐(0) 编辑
摘要: #include struct ele{ int no; struct ele *link;}main(){ int n,m,i; struct ele *h,*u,*p; clrscr(); printf("Please input n&m:\n"); scanf("%d%d",&n,&m);/*输入n和m*/ h=u=(struct ele *)malloc(sizeof(struct ele));/*形成首表元*/ h->no=1; for(i=2;ilink=(struct ele *)malloc(sizeof(s 阅读全文
posted @ 2014-03-29 22:00 xzenith 阅读(134) 评论(0) 推荐(0) 编辑