0
How to use is_regular_file or what to use instead?
I get the path of "ofstream fout" using getline(), and need to check if it correct to open and output values. I was told that this function can help to avoid files like "con.txt". Tried it many times but always got library errors because of fstream and becuse filesystem is not a part of namspace std.
1 Answer
0
Save a copy of your code as a code bit in SoloLearn, and attach link to the saved code in the thread's Description for thread viewers to analyse.
https://www.sololearn.com/post/75089/?ref=app
Looks like <filesystem> needs C++17.