C++ fstream-File works without extension?

Started by
1 comment, last by Deadlybones 11 years, 11 months ago
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).
Advertisement
You don't have file extensions visible in explorer. Thus the filename you entered was "example.txt.txt"

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

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?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


You don't have file extensions visible in explorer. Thus the filename you entered was "example.txt.txt"


Thanks for the quick reply. I found someone else who had the same problem on google but I didn't have enough time to delete the thread. You're just too quick I guess ;)

This topic is closed to new replies.

Advertisement