how to delete a line in a text file

Discussion on Coding.
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

ok i sreached all around google an couldnt find out how to delete a line in c++

ok in hb account file we got
[CHARACTERS]
account-character = ByeBye
account-character = test
account-character = NightRider

say i want to delete this line

Code: Select all

account-character  = NightRider
only Nothing else how woudl i do this

thnks to anyone thats knows
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sentinel
Loyal fan
Posts: 462
Joined: Thu Jan 11, 2007 4:16 pm

Post by Sentinel »

The point of this would be.....?
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
Scale
Member
Posts: 178
Joined: Thu Nov 20, 2003 4:04 pm

Post by Scale »

my c++ is crap,
but basicly u would have to read the text file using a filestream to read the file loop trough all the lines till u find the line u want and remove it and write it back out.

I could write it for u in c# cant do more then that ;)
Sentinel
Loyal fan
Posts: 462
Joined: Thu Jan 11, 2007 4:16 pm

Post by Sentinel »

Scale wrote: my c++ is crap,
but basicly u would have to read the text file using a filestream to read the file loop trough all the lines till u find the line u want and remove it and write it back out.

I could write it for u in c# cant do more then that ;)
Lol Scale.. I couldn't even write it in C#, let alone C++. I do HTML/XHTML/Some PHP.
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

just replace the line with a blank one?
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Sentinel
Loyal fan
Posts: 462
Joined: Thu Jan 11, 2007 4:16 pm

Post by Sentinel »

binarydata wrote: just replace the line with a blank one?
Or, you could jsut not have it appear anything..

If it said..

Character-Name =

Just have it be blank like that. I'm guessing this is some sort of new anti-character thing. or some weird shit like that?
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->charlie says:<br>i may own outpost but im not a nerd<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->(locobans @ Mar 12 2007, 10:48 PM) <br>"Remember while peeing, If you shake it more than twice you playing with it..." <br><!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
charlie
Outpost4lyfe
Posts: 3324
Joined: Sun Apr 06, 2003 12:24 am
Location: Mt GOD
Contact:

Post by charlie »

3 useless posts by thomas the retarded tank engine
Girlfriends are dedicated hookers.
Orkl
Loyal fan
Posts: 376
Joined: Sat Sep 17, 2005 2:31 pm

Post by Orkl »

charlie wrote: 3 useless posts by thomas the retarded tank engine
rofl
<!--QuoteBegin-crazymnig88+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (crazymnig88)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->by notepad??? it didn't show any code, just show words wif no mean<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br><!--QuoteBegin-charlie+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (charlie)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->he'll probably save it as 600pagebook.bmp<br><br>400gb file plzkthnx<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd-->
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

we got enuff spam just not help on topic
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sprint
Spamtastic
Posts: 1000
Joined: Tue Jun 06, 2006 6:59 am
Location: Far from home
Contact:

Post by Sprint »

sql:
DELETE * FROM [name of table] WHERE [column] ='NightRider'

lol

edit: typo oops
<span style='color:blue'><span style='font-size:19pt;line-height:100%'><u><b>FUCK Helbreath!</b></u></span></span><br><br><span style='color:gray'><a href='http://www2.analystica.com/users/anttu/online/ngd' target='_blank'>ngdnetwork</a> OFFICIAL WEBSITE OF Northern Game Developers. Do visit! (THEY ARE UP!)<br><a href='http://project3d.x.am' target='_blank'>Project3d development forum</a> plz join and discuss,develop,give ideas,feedback. Anything goes as long it helps the project!</span><br><br>Zepto Znote 6625WD: 1.8Ghz dual core, 2GB, 512mb graphics card(dedicated), 160GB HDD<br><img src='http://www.signaturebar.com/uploads/images/10111.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/13229.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/8852.png' border='0' alt='user posted image' />
SexyBitch
Member
Posts: 199
Joined: Mon Mar 29, 2004 12:17 pm
Location: UK, London
Contact:

Post by SexyBitch »

Sprint wrote: sql:
DELETE * FROM [name of column] WHERE [column] ='NightRider'

lol
He said C++ not SQL, but i cant understand why you would need that in the code so i think he means SQL

Sexy

But if you mean C++

just hit del key for the line you want to remove then rebuild it. if you rebuild and get error it will show you each section the error comes from and you can sort it.

if sql then you got that in the post above
<img src='http://72.29.68.107/~helbrea/lorraine/S ... itch01.gif' border='0' alt='user posted image' />
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

SexyBitch wrote:
Sprint wrote: sql:
DELETE * FROM [name of column] WHERE [column] ='NightRider'

lol
He said C++ not SQL, but i cant understand why you would need that in the code so i think he means SQL

Sexy

But if you mean C++

just hit del key for the line you want to remove then rebuild it. if you rebuild and get error it will show you each section the error comes from and you can sort it.

if sql then you got that in the post above
its fro mainserver src i need it for account file when u delete a char it has to delete the char in the account file
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sprint
Spamtastic
Posts: 1000
Joined: Tue Jun 06, 2006 6:59 am
Location: Far from home
Contact:

Post by Sprint »

SexyBitch wrote:
Sprint wrote: sql:
DELETE * FROM [name of column] WHERE [column] ='NightRider'

lol
He said C++ not SQL, but i cant understand why you would need that in the code so i think he means SQL

Sexy

But if you mean C++

just hit del key for the line you want to remove then rebuild it. if you rebuild and get error it will show you each section the error comes from and you can sort it.

if sql then you got that in the post above
he said txt lol, and i had a typo in my post in the code oops lol
<span style='color:blue'><span style='font-size:19pt;line-height:100%'><u><b>FUCK Helbreath!</b></u></span></span><br><br><span style='color:gray'><a href='http://www2.analystica.com/users/anttu/online/ngd' target='_blank'>ngdnetwork</a> OFFICIAL WEBSITE OF Northern Game Developers. Do visit! (THEY ARE UP!)<br><a href='http://project3d.x.am' target='_blank'>Project3d development forum</a> plz join and discuss,develop,give ideas,feedback. Anything goes as long it helps the project!</span><br><br>Zepto Znote 6625WD: 1.8Ghz dual core, 2GB, 512mb graphics card(dedicated), 160GB HDD<br><img src='http://www.signaturebar.com/uploads/images/10111.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/13229.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/8852.png' border='0' alt='user posted image' />
bone-you
Spamtastic
Posts: 1310
Joined: Wed Mar 16, 2005 3:12 am

Post by bone-you »

You guys need to figure it out on your own. If you can't do this, don't make the main server. Coming to these retards won't help you anyway.

Didn't want to post it.. but I will. Not here though.
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia :D</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.
Sprint
Spamtastic
Posts: 1000
Joined: Tue Jun 06, 2006 6:59 am
Location: Far from home
Contact:

Post by Sprint »

btw whats really the diffrence between html and xhtml, iv never understand it
<span style='color:blue'><span style='font-size:19pt;line-height:100%'><u><b>FUCK Helbreath!</b></u></span></span><br><br><span style='color:gray'><a href='http://www2.analystica.com/users/anttu/online/ngd' target='_blank'>ngdnetwork</a> OFFICIAL WEBSITE OF Northern Game Developers. Do visit! (THEY ARE UP!)<br><a href='http://project3d.x.am' target='_blank'>Project3d development forum</a> plz join and discuss,develop,give ideas,feedback. Anything goes as long it helps the project!</span><br><br>Zepto Znote 6625WD: 1.8Ghz dual core, 2GB, 512mb graphics card(dedicated), 160GB HDD<br><img src='http://www.signaturebar.com/uploads/images/10111.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/13229.jpg' border='0' alt='user posted image' /><br><img src='http://www.signaturebar.com/uploads/images/8852.png' border='0' alt='user posted image' />
Post Reply