-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
33 lines (20 loc) · 775 Bytes
/
main.c
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
#include <stdio.h>
#include <stdlib.h>
#include "global.h"
#include "functions.h"
#include "tree_functions.h"
#include "user_interface.h"
int main(void) {
struct Library *lib;
int libSize;
libSize = createLibrary(lib);
//initializes each struct in the Library, setting a letter a sequence. this cannot be put into a function or it breaks the whole code. Ive tried and debugged, but its some very weird problem. You, Mr. Knowles, said its fine if I leave it in here
for(int i = 0; i < libSize; i++) {
printf("Enter a letter then its sequence:\n");
scanf(" %c %s", &(lib+i)->letter, &(lib+i)->sequence);
}
char binarySequence[250];
struct node *root = newNode('\0');
run(lib, libSize, binarySequence, root);
return 0;
}