Thu Nov 13, 2008 7:29 pm
#include <iostream>
using std::cout;
using std::endl;
#include <string>
using std::string;
int main()
{
string string1( "This is a test string!");
int location;
cout << "Original string:\n" << string1
<< "\n\n(find) \"is\" was found at: " << string1.find( "is" );
return 0;
}
/*
Original string:
This is a test string!
(find) "is" was found at: 2
*/
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.