C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How to delete perticular srting in a file Posted by ramscruise on 26 Mar 2009 at 1:04 PM
Hello Guys,
I am unable to delete a particular string in a file, let say there is a file, named it as myfile.txt which contain strings such as

America
England
London
San Diego
Vegas
Atlanta
Georgia
Alaska
Africa
New jersey
New York

from above myfile.txt file, I want to delete "Atlanta" string and After deleting "Atlanta" string, the myfile.txt should be

America
England
London
San Diego
Vegas
Georgia
Alaska
Africa
New jersey
New York

will be appreciated if some body help me......
Thanks in advance

Regards
Cruise

Report
Re: How to delete perticular srting in a file Posted by Nacro on 27 Mar 2009 at 4:35 AM
From
v.arulprkash
sastra university
india
sub:
use the for loop for getting the string location
then replace the string with the coming up strings....




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.