View Single Post
  #4  
Old 11-13-2007, 02:36 AM
pokergrader pokergrader is offline
Senior Member
 
Join Date: Apr 2005
Posts: 3,792
Default Re: PLEASE Help Me With Simple C++ Code!

Don't mess with C stuff. Use the C++ string class, especially the find(string, index) function.

Sample code to get you started:
<font class="small">Code:</font><hr /><pre>
string a = "5 meg file hate me hate me hate men gg hate merry";
cout &lt;&lt; a.find("hate me",0) &lt;&lt; "\n";
cout &lt;&lt; a.find("hate me",20) &lt;&lt; "\n";
</pre><hr />
Reply With Quote