C++ fstream-File works without extension?
I was playing around with C++ file i/o today and couldn't seem to get it to work. I renamed my file from "example.txt" to just "example" and it worked(I still loaded it using .Open("example.txt") though in my program). Why is this? I would like to include the extention in my file name(specifically a custom name such as "example.custom", but it would still be a .txt file).
You don't have file extensions visible in explorer. Thus the filename you entered was "example.txt.txt"
Can you post the code you used for this? Also, are you sure you're not looking in a different directory than the one you put the renamed file in?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement