2
下面是心不是工作了我,我很聲明一個指向結構代碼的一部分,我嘗試使用它的功能,雖然Ç說,它不能爲主人轉換成的人。結構的指針在函數中聲明
void display (char *s2,FILE *f1,int max);
void insert (FILE *f1, struct person *p1);
void deletestring (FILE *f1,FILE *f2,char *s2,char *s1,char *file1,char *file2,int max);
void edit (FILE *f1,FILE *f2,char *s2,char *s1,char *file1,char *file2,struct person *p1,int max);
int main()
{
char s1[MAX],s2[MAX];
FILE *f2,*f1;
struct person
{
char id[MIN];
char emer[MIN];
char mbiemer[MIN];
};
struct person p1;
struct person *pp1;
pp1 = &p1;
char *file1 = "f1.txt";
char *file2 = "f2.txt";
int zgjedhja=1;
printf("Programi funksionon sipas shpjegimit \n :");
printf("Shtypni 1 per te shtuar nje person \n Shtypni 2 per te ndryshuar informacionin e nje personi \n Shtypni 3 per te shfaqur te dhenat \n Shtypni 4 per te fshire nje person \n Shtypni -1 per te dale nga programi \n ");
while (zgjedhja != -1)
{
printf("Jepni zgjedhjen tuaj \n ");
scanf(" %d " , & zgjedhja);
switch (zgjedhja)
{
case 1:
f1=fopen(file1,"a");
insert (f1,pp1);
那麼,這很好地工作。感謝7分鐘,直到你得到正確的答案獎:P。 – Lind 2013-03-20 17:13:58