How to dynamically allocate memory for char** in C
问题 How would I go about dynamically allocating memory to char** list in this function? Basically the idea of this program is I have to read in a list of words from a file. I cannot assume max strings or max string length. I have to do other stuff with the C-strings but that stuff I should be fine with. Thanks! void readFileAndReplace(int argc, char** argv) { FILE *myFile; char** list; char c; int wordLine = 0, counter = 0, i; int maxNumberOfChars = 0, numberOfLines = 0, numberOfChars = 0; myFile