Why doesn't this main print anything? It should print the first word in the file.
int main(int argc, char *argv[])
{
FILE *file = fopen(argv[1], "r");
int n = atoi(argv[2]);
char **words = new char*[n];
for(int i = 0; i < n; i++)
{
fscanf(file, "%s ", words[i]);
}
cout << words[0] << endl;
}