当前位置: > 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?还是找单个的?

提问时间:2020-08-09

答案
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
举一反三
已知函数f(x)=x,g(x)=alnx,a∈R.若曲线y=f(x)与曲线y=g(x)相交,且在交点处有相同的切线,求a的值和该切线方程.
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.