1 Replies - 2250 Views - Last Post: 13 May 2008 - 11:18 PM Rate Topic: -----

#1 raghav_engg  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-April 08

search a string in between lines

Posted 13 May 2008 - 10:15 PM

Hi



 i'm doing a program which is helpful for me.


consider this is a line which is present as a string in this i want to search for a word "help" if found it should go inside loop else it should exit.

please help me out...

Thanks in advance
Is This A Good Question/Topic? 0
  • +

Replies To: search a string in between lines

#2 pertheusual  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 245
  • Joined: 26-January 08

Re: search a string in between lines

Posted 13 May 2008 - 11:18 PM

are you using c++, or c. the c++ string class has a find function already and string.h has a strstr function for finding substrings too.

http://www.cplusplus...tring/find.html
http://www.cplusplus...ing/strstr.html

if you write a bit of code to show an attempt, i'd be glad to help you out some more.

per
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1