| h4344 (41) | |||||||
|
Is there a way i can "comment out" lines in a txt file that im reading data from? The actual prefix im looking for to decide wheather or not to ignore the line dosent really matter, just thought comment's would be the best example. So kinda like- (yes im sure this is wrong, its just an example) Code
whatever.txt
Results
| |||||||
|
Last edited on
|
|||||||
| Darkmaster (311) | |
|
no you can't. you first have to read the line in order to know it says: Dont read me but you can decide after you read it, what you want to do with it | |
|
|
|
| Lim Boon Jye (53) | |
|
you can ignore . use File.ignore(1,\'n') ignore next line then read another line | |
|
|
|
| HellfireXP (46) | |||
|
Yes, you can ignore lines in a file (sorta)... First, create a file in a directory of your choosing... I put the following data in the text file: ----------FILE------------- ;Database Do this here 123 33 79 ---------EOF---------------- The code...
The screen printout looked like this: IGNORE LINE Do this here IGNORE LINE 123 33 79 | |||
|
Last edited on
|
|||
| Aramil of Elixia (772) | |
| cant getline read until it hits something? traditionally thats endl but can't it be the line? | |
|
|
|
| SamuelAdams (185) | |||
|
Thx for that Hellfire! I'm sure I will use this if (line.length() == 0)I couldn't get yours to compile so changed it to this:
| |||
|
|
|||