-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFUN4.h
65 lines (65 loc) · 1.41 KB
/
FUN4.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __FUN4_H
#define __FUN4_H
#include<stdio.h>
#include<stdlib.h>
#include"STRINGHEAP.h"
#include"TREENODE.h"
void Fun41(FILE *fdat,Tree *t){
int game,time;
TreeNode *tmp;
tmp=t->p->sibling->sibling->sibling->child->sibling->sibling->sibling->child;
system("cls");
PrintString(tmp->data);
scanf("%d,%d",&game,&time);
while(1){
if(game==-1){
break;
}
else if(game>=1&&game<=10){
fseek(fdat,216+4*(game-1),SEEK_SET);
fwrite(&time,sizeof(int),1,fdat);
PrintString(t->p->data);
}
else{
PrintString(t->p->sibling->data);
}
printf("\n\nPress \"enter\" to return\n\n");
fflush(stdin);
getchar();
fflush(stdin);
system("cls");
PrintString(tmp->data);
scanf("%d,%d",&game,&time);
}
return;
}
void Fun42(FILE *fdat,Tree *t){
int game,time;
TreeNode *tmp;
tmp=t->p->sibling->sibling->sibling->child->sibling->sibling->sibling->child->sibling;
system("cls");
PrintString(tmp->data);
scanf("%d,%d",&game,&time);
while(1){
if(game==-1){
break;
}
else if(game>=1&&game<=10){
fseek(fdat,256+4*(game-1),SEEK_SET);
fwrite(&time,sizeof(int),1,fdat);
PrintString(t->p->data);
}
else{
PrintString(t->p->sibling->data);
}
printf("\n\nPress \"enter\" to return\n\n");
fflush(stdin);
getchar();
fflush(stdin);
system("cls");
PrintString(tmp->data);
scanf("%d,%d",&game,&time);
}
return;
}
#endif