I have a double pointer, and I need to read words into it. Here's what I have so far:
keyinputter is an array of size 30. The first while loop finds the number of words in a file so that I can calloc the correct amount of space for the double pointer, keywords. The second while loop is supposed to read the words into the double pointer, but when I run a print statement to print the string at keywords, it only prints null and not the word. Am I assigning the strings to the double pointer in the wrong way?
keywords = (char**)calloc(keys_cnt,sizeof(char));
keywords[y] = strdup(keyinputter);