Hey everyone I am new to this forum. I have a quite puzzling question, I am working on a piece of code that'll take words from a word list and cout them on the screen. I uploaded the file and everything I am using strtok and its using the \n as its delimiters.

Heres the code-- It did doesn't "cout" anything. Thanks

#include <iostream>
#include <string>

using namespace std;

int func(char * filePath);


int main()
{
char intake[1024] = {'NULL'};
cout << "Enter in path of the file.\n";
cin >> intake;

func(intake);
return 0;

}


int func(char * filePath)
{
FILE * pFile;
char * x;
pFile = fopen(filePath, "r");
while (pFile != NULL)
{
x = strtok(filePath, "\n");
cout << x;
}

return 0;
}