#include <string>
#include <iostream>
using namespace std;
void main() {
string a = "http://www.163.com//text.rm?user=...";
int pos = a.find("text");
if(pos != string::npos) {
// pos indicates the starting of "text"
// do what you want with pos
// ...
}
}