Help! Creating output files in C++

Discussion in 'OT Technology' started by wumpusHunter, Jan 25, 2008.

  1. wumpusHunter

    wumpusHunter New Member

    Joined:
    Nov 24, 2007
    Messages:
    24
    Likes Received:
    0
    I'm writing a porgram in C++. I'm having the program create an output .txt file using the standard fstream library functions. The content of the file looks fine, but I think it's creating a "read-only" file. I can't open it up for editing in Excel, which is what I really need to do. I can get around it by saving the output file as a new file using a text editor (one that allows editing of read-only files), but that's a bit of a pain. Is there any way to get my program to create a .txt file that isn't read-only?

    BTW, I don't know if it matters, but I'm compiling with Cygwin.

    Thanks in advance!
     
  2. tuna816

    tuna816 New Member

    Joined:
    Jan 4, 2005
    Messages:
    101
    Likes Received:
    0
    man umask?
     
  3. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    You're not closing the file after you've written it.
     

Share This Page