Saturday, 7 September 2013

Seemingly automatic pointer freeing

Seemingly automatic pointer freeing

I have a function whichtakes a file, reads it line by line, puts every
line in a *char[], puts this twodimensional array in a struct, and returns
this struct: wordlist.h:
#ifndef H_WORDLIST
#define H_WORDLIST
typedef struct {
char **chWordsList;
int listlen;
}Wordlist;
Wordlist getWordlistFromFile(char *chFilename);
char *getRandomWord();

No comments:

Post a Comment