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 << a.find("hate me",0) << "\n";
cout << a.find("hate me",20) << "\n";
</pre><hr />
|