C2
parent
176564b9f6
commit
1e67d94fdd
@ -0,0 +1,40 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define MAX 1000
|
||||
typedef struct node {
|
||||
char a[100];
|
||||
struct node* next;
|
||||
}edgenode;
|
||||
typedef struct {
|
||||
char name[100];
|
||||
edgenode* firstnode;
|
||||
}vexnode;
|
||||
typedef struct {
|
||||
vexnode adjust[7];
|
||||
int e, n;
|
||||
}list;
|
||||
list nm;
|
||||
|
||||
char position[100]="address.txt";
|
||||
|
||||
typedef struct {
|
||||
char s[100];
|
||||
}filed;
|
||||
filed fi[100];
|
||||
void createfile(){
|
||||
int i;
|
||||
FILE* op;
|
||||
op=fopen(position,"ab");
|
||||
if(op==NULL){
|
||||
printf("该文件未找到");
|
||||
return ;
|
||||
}
|
||||
char strs[100];
|
||||
for(i=0;i<7;i++){
|
||||
printf("请输入:\n");
|
||||
scanf("%s",strs);
|
||||
fprintf(op,"%s\n",strs);
|
||||
}
|
||||
fclose(op);
|
||||
}
|
Loading…
Reference in new issue