| View previous topic :: View next topic |
| Author |
Message |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Tue Aug 05, 2008 8:00 pm Post subject: [C++] Memo line by line |
|
|
Does anyone know how to read a memo line by line?
im coding in Borland C++ btw.
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Wed Aug 06, 2008 3:40 am Post subject: |
|
|
Erm.. Could you explain a bit more? What kind of memo? Just some .txt?
Just open the file and keep doing .operator>> until the end is reached?
|
|
| Back to top |
|
 |
slippppppppp Grandmaster Cheater
Reputation: 0
Joined: 08 Aug 2006 Posts: 929
|
Posted: Wed Aug 06, 2008 10:18 am Post subject: |
|
|
No, im not openning any text.
I have a Memo or a RichEdit on my form.
As you type, there might be several lines of different commands.
I want to be able to read each line one by one.
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Wed Aug 06, 2008 10:19 am Post subject: |
|
|
cin.getline()?
_________________
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Wed Aug 06, 2008 4:17 pm Post subject: |
|
|
| HalfPrime wrote: | | cin.getline()? |
That's for a console.
@OP:
Try taking the entire string, then parsing it using some type of method to split it by '\r\n' or something.
_________________
|
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Wed Aug 06, 2008 4:21 pm Post subject: |
|
|
Whoops. Just getline(file, string), not cin.getline().
_________________
|
|
| Back to top |
|
 |
|