Skip to main content
gamedev.net
🔒 Locked

C++ fstream-File works without extension?

Started by Deadlybones 1 reply 1.7k views
Original Post
Deadlybones
Deadlybones
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).
Washu
Washu
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.
Deadlybones
Deadlybones

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 ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.