Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void test(char* path_input){
- //Datei lesbar öffnen
- FILE *input = fopen(path_input, "r");
- if(input == NULL){
- perror("Datei konnten nicht geöffnet werden!");
- exit(1);
- }
- //bufflength Zeilen auslesen
- char *pos_val;
- char *akt_film;
- char** keys = malloc(GES_FILME * sizeof(char*));
- int num_f;
- for(num_f = 0; num_f < GES_FILME && feof(input) == 0;num_f++){
- akt_film= malloc(bufflength * sizeof(char));
- fgets(akt_film, bufflength, input);
- pos_val = strchr(akt_film, ';');
- //Ersetze \n am Ende durch \0
- if(pos_val != NULL)
- *pos_val = '\0';
- pos_val++;
- keys[num_f] = malloc((strlen(akt_film))*sizeof(char));
- strncpy(keys[num_f],akt_film,strlen(akt_film));
- //set(akt_film,pos_val);
- }
- for(int i = 0; i < num_f; i++){
- //get(key);
- }
- for(int i = 0; i < num_f; i++){
- //delete(key);
- }
- for(int i = 0; i < num_f; i++){
- //get(key);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement