Sign in to follow this  

C++ fstream-File works without extension?

This topic is 2048 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
You don't have file extensions visible in explorer. Thus the filename you entered was "example.txt.txt" Edited by Washu

Share this post


Link to post
Share on other sites
[quote name='Washu' timestamp='1336097038' post='4937267']
You don't have file extensions visible in explorer. Thus the filename you entered was "example.txt.txt"
[/quote]

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

Share this post


Link to post
Share on other sites

This topic is 2048 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this