home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18733 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  987 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!cs.utexas.edu!not-for-mail
  2. From: wanling@swl.spec.ptg.sony.co.jp (Quak Wan Ling)
  3. Newsgroups: comp.lang.c++
  4. Subject: 0-mode file created with ofstream
  5. Date: 5 Jan 1993 19:32:12 -0600
  6. Organization: UTexas Mail-to-News Gateway
  7. Lines: 21
  8. Sender: daemon@cs.utexas.edu
  9. Message-ID: <9301060130.AA01788@garfield.swl.spec.ptg.sony.co.jp>
  10. NNTP-Posting-Host: cs.utexas.edu
  11.  
  12. I am new to C++ programming and was trying out the filecopy program
  13. in the "The C++ Programming Language, 2nd edition" on a SGI running 
  14. AT&T C++ 2.0.
  15.  
  16. When I copy a file to a *non-existing* file, the new file that is
  17. created has mode 0. It is the same when I specify
  18.  
  19.     ofstream    dest(argv[2], ios::app);
  20.  
  21. If the destination file already exists, then I do not have any problems.
  22.  
  23. Can anyone please tell me how to create a new file with, say, for example,
  24. mode 644 ?
  25.  
  26. Thanks in advance.
  27.  
  28. ------------------
  29. Quak Wan Ling
  30. wanling@swl.spec.ptg.sony.co.jp
  31. ------------------
  32.  
  33.