Mega Code Archive
Use the STL find() algorithm to obtain an iterator to the start of the first a
#include
#include
#include
#include
#include
using namespace std;
int main()
{
string strA("This is a test.");
string::iterator itr = find(strA.begin(), strA.end(), 'a');
return 0;
}