Question regarding <fstream>

This is a discussion on Question regarding <fstream> within the C++ Programming forums, part of the General Programming Boards category; Hello. When I was playing around and writing an array of strings into a file in a function of class ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Location
    Brunei
    Posts
    77

    Question regarding <fstream>

    Hello.

    When I was playing around and writing an array of strings into a file in a function of class A , and then in another class B, I read the file, storing their strings into another array of the class B. And in this class B, I tried to print out the strings, but it only print out blank spaces. What happen here?

    How do you ofstream a file from one class, and then ifstream it in another class?

  2. #2
    Registered User
    Join Date
    Nov 2012
    Location
    Brunei
    Posts
    77
    Ohh nvm got it now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fstream question
    By Tool in forum C++ Programming
    Replies: 2
    Last Post: 06-15-2010, 05:14 PM
  2. FStream Question
    By CPP-Null in forum C++ Programming
    Replies: 5
    Last Post: 05-25-2003, 01:28 PM
  3. fstream question!
    By FutureCoder in forum C++ Programming
    Replies: 1
    Last Post: 01-31-2003, 03:06 PM
  4. fstream question
    By Agent89 in forum C++ Programming
    Replies: 28
    Last Post: 06-06-2002, 11:14 AM
  5. fstream.h question
    By bluehead in forum C++ Programming
    Replies: 12
    Last Post: 04-13-2002, 01:06 PM

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