You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
627 B
40 lines
627 B
1 year ago
|
#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);
|
||
|
}
|