Having file i/o trouble

This is a discussion on Having file i/o trouble within the C++ Programming forums, part of the General Programming Boards category; Code: #include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> using std::cout; using std::cin; using std::ifstream; using std::ofstream; using std::ios; . ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    26

    Having file i/o trouble

    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <iostream>
    #include <fstream>
    
    using std::cout;
    using std::cin;
    using std::ifstream;
    using std::ofstream;
    using std::ios;
    
    . . .
    
    ifstream list1("list1.txt", ios::nocreate);
    I'm getting this error:

    Code:
    18 C:\Dev-Cpp\mp3.cpp   `nocreate' is not a member of type `std::basic_ios<char,
    I don't understand what's wrong. Last I checked, ios::nocreate worked fine. Sorry--I searched around, and couldn't find anything. Thanks in advance.
    --LiKWiD
    Becoming un-noobified one day at a time.

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,794
    Check out the last post in this thread.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Subtle(?) File I/O Problem
    By cecomp64 in forum C Programming
    Replies: 9
    Last Post: 07-16-2008, 11:39 AM
  3. File I/O Question
    By Achy in forum C Programming
    Replies: 2
    Last Post: 11-17-2005, 11:09 PM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21