In above code , how I will get index inside vector , where my search string is found?Code:typedef vector<string> vString; vector<vString> vBig; vString vSmall; vString vType; vString::iterator itr; bool bPresent =false; string type="phone"; string val="857867"; for(itr=vType.begin();itr!=vType.end();itr++) { string data = *itr; if(type.compare(data)==0) { bPresent=true; break; } }



LinkBack URL
About LinkBacks




I used to be an adventurer like you... then I took an arrow to the knee.