Computing.Net > Forums > Programming > C++ File Read

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C++ File Read

Reply to Message Icon

Name: livingdecay
Date: March 15, 2005 at 10:42:50 Pacific
OS: Win XP Pro
CPU/Ram: Athlon 64 S939 3000+ / 51
Comment:

I am trying to find out what the easiest way to read text from a file into a variable (to put into an editbox) is?

AMD Athlon 64 S939 3000+
ASUS A8V Deluxe WE MoBo
20Gb + 80Gb ATA133 HDD
Leadtek geforce 6800 128Mb
ThermalTake 360W PurePower PSU




Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: March 16, 2005 at 05:57:18 Pacific
Reply:

string dataLINE = "";
ifstream inFILE ("filename.txt", ios::in );
while(inFILE >> dataLINE)
{
// dataline now contains a line from the file so you can put it into an editbox
}

Hope this helps you
Chi

They mostly come at night...mostly


0

Response Number 2
Name: livingdecay
Date: March 16, 2005 at 09:38:09 Pacific
Reply:

I'll try that, thanks.

AMD Athlon 64 S939 3000+
ASUS A8V Deluxe WE MoBo
20Gb + 80Gb ATA133 HDD
Leadtek geforce 6800 128Mb
ThermalTake 360W PurePower PSU



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C++ File Read

C++ File Reading www.computing.net/answers/programming/c-file-reading/16213.html

Adding copy to c:\files on send to menu www.computing.net/answers/programming/adding-copy-to-cfiles-on-send-to-menu/261.html

c++ file I/O, open/close file www.computing.net/answers/programming/c-file-io-openclose-file/11306.html