Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include "erzeugen.h"
- #define CHARL 150
- char line[CHARL];
- void readtxt()
- {
- FILE* fp = fopen("bw.txt","r");
- while(fgets(line, CHARL, fp) != NULL)
- {
- char *wort;
- char *wort2;
- wort = strtok(line, ":");
- printf("%s \n", wort);
- insertKnoten(wort);
- while(strcmp(wort, "\n") != 0)
- {
- printf("%s \n", wort2);
- wort2 = strtok(NULL, ":");
- insertKnoten(wort2);
- insertKante(wort, wort2);
- }
- //if(wort != "") insertKnoten(wort)
- }
- }
- int main(){
- readtxt();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement