Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:59:33+00:00 2026-06-10T17:59:33+00:00

When i use text files for input and output using fstream filestream, the file

  • 0

When i use text files for input and output using fstream filestream, the file extension used is .txt

I have seen people use instead of .txt:

They use .DAT and still they open it in a text editor as if it were a text file.

So is DAT a text file extension and are there what are all the extensions i can use with text files.?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:59:35+00:00Added an answer on June 10, 2026 at 5:59 pm

    The short answer: text files can have any extension you want, including NO extension. You can take somefile.txt and rename it to somefile.XYZPDQ if you feel like it. It will still be a text file.

    That’s from a pure C++ language perspective. At the operating system level, a file extension may be associated with a certain program type (you might have .mp4 videos open in a video player, for example). But you can still call any text file anything you want. Nothing stops you from doing this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a big text file (5Mb) that I use in my Android application.
I have a number of text file. I would like to use NLTK for
I have a text file which was created using some Microsoft reporting tool. The
Write a program which reads a text file called input.txt which contains an arbitrary
I my text files (java) I use markers like $Author$ , $Date$ , $Revision$
i use LineNumberReader to read text file , when call setLineNumber and getLinenumber it
I use the following coding which edits my text file based on the value
Which function can I use to get the content of a plain text file?
I am trying to use FileHelper library for parsing a text file. Ultimately the
What encoding we need to use to save a file as text file(of type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.