'File name variable in file path in C

So I am writing a program that uses text files. I have a line of code that goes like this.

pfw = fopen(fileName, "w");

I am trying to make that program to create a txt file in this relative path

./TextFiles/

I have no idea how to implement a fileName variable in the file path. I usually do it like this when I have static fileName and program doesn't ask me to give it a file name or where fileName is not a variable and it works.

pfw = fopen("./TextFiles/fileName.txt", "w");


Solution 1:[1]

Found the issue: Issue is with the script that transformed JSON -> XML, instead of Phone_Extension it is using Phone_ExtensionStr

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Thecugoteen