find_first_of函数的用法string s="abcdefghijkabcddacb";int i=s.find_first_of('b',1);int j=s.find_first_of('b',2);请问i,j等于多少?函数括号里的第二个参数到底是什么意思?int i=s.find_first_of('basdf',1); int j=s.find_first_of(

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/05 02:30:21
find_first_of函数的用法strings="abcdefghijkabcddacb";inti=s.find_first_of(''b'',1);intj=s.find_first_of(''b''

find_first_of函数的用法string s="abcdefghijkabcddacb";int i=s.find_first_of('b',1);int j=s.find_first_of('b',2);请问i,j等于多少?函数括号里的第二个参数到底是什么意思?int i=s.find_first_of('basdf',1); int j=s.find_first_of(
find_first_of函数的用法
string s="abcdefghijkabcddacb";
int i=s.find_first_of('b',1);
int j=s.find_first_of('b',2);
请问i,j等于多少?
函数括号里的第二个参数到底是什么意思?
int i=s.find_first_of('basdf',1);
int j=s.find_first_of('basdf',2);
这又等于多少?那第一个参数是是什么意思?是找basdf?还是找单个的?

find_first_of函数的用法string s="abcdefghijkabcddacb";int i=s.find_first_of('b',1);int j=s.find_first_of('b',2);请问i,j等于多少?函数括号里的第二个参数到底是什么意思?int i=s.find_first_of('basdf',1); int j=s.find_first_of(
i=1,j=12
第二个参数是位置,从零开始算
-----------------------------------
我把你的程序改了改,要不没法再VC下运行
#include
#include
#include
using namespace std;
void main()
{
string s="abcdefghijkabcddacb";
int i=s.find_first_of('b',1);
int j=s.find_first_of('b',2);
cout