find查找string未找到返回值-1
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
signed main()
{
std::ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
string a,b;
a="nihao";
int t=a.find("c");
cout<<t;
return 0;
}
using namespace std;
#define int long long
#define endl '\n'
signed main()
{
std::ios::sync_with_stdio(false);cin.tie(0); cout.tie(0);
string a,b;
a="nihao";
int t=a.find("c");
cout<<t;
return 0;
}
全部评论
相关推荐
06-04 10:32
安徽大学 单片机 实习僧和BOSS直聘都投了几十家,硬件开发,硬件测试,嵌入式都投了,全是已读不回……我现在考虑想在秋招前速成一个Linux项目,其实现在完全不知道自己要找什么方向的,只能海投了,求大佬们给点意见😭😭😭

点赞 评论 收藏
分享
点赞 评论 收藏
分享