Thread: file IO RESOURCE

  1. #1
    Registered User
    Join Date
    Oct 2016
    Posts
    4

    file IO RESOURCE

    Hello i am trying to add a .txt file to resources this is what i have so far.


    in resource file,

    MYFILE TXT "loadfile.txt"



    in main.cpp

    ifstream qFile("MYFILE");

    is this correct? thanks

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,675
    > ifstream qFile("MYFILE");
    This line needs to be something which gets a resource named MYFILE.

    At the moment, you're literally looking for a file called MYFILE.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [GCC] - how add resource file to exe?
    By joaquim in forum Tech Board
    Replies: 0
    Last Post: 08-28-2013, 07:33 AM
  2. Resource File Fun...
    By Junior89 in forum Windows Programming
    Replies: 3
    Last Post: 04-15-2007, 01:28 PM
  3. Need help in resource file
    By Darkinyuasha1 in forum Windows Programming
    Replies: 7
    Last Post: 11-27-2006, 07:31 PM
  4. Resource file
    By beene in forum Windows Programming
    Replies: 3
    Last Post: 10-16-2006, 01:54 PM
  5. Need help with resource (rc) file
    By Magos in forum C++ Programming
    Replies: 3
    Last Post: 09-06-2001, 11:47 PM

Tags for this Thread