[Solved] c++ : How to ask a file name and print char Array [closed]


If there is a file that you want to open, you can try a file stream. Here is a good look at how to open a file for input and output. Just make sure to check if you can actually open the file before you try to read/write from/to it. You can do it with

if(inputFile.is_open())
{
    //your code here
}

If you just want to see if it is a valid file extension, check the last part of the string.
If you have a list of file names, compare what they input and what you have to see if they are the same.

1

solved c++ : How to ask a file name and print char Array [closed]