首页 > 其他 > 详细

请回答我,,

时间:2015-10-12 20:56:17      阅读:228      评论:0      收藏:0      [点我收藏+]

#include<stdio.h>
#include<iostream>
#include<string>
//#include<string.h>
using namespace std;
int main()
{
 string s1,s2;
 int n;
 cin>>n;
 while(n--)
 {
  cin>>s1>>s2;
  int m=s2.find(s1,0);
  int num=0;
  while(m!=string::npos)
  {
   num++;
   m=s2.find(s1,m+1);
  }
  cout<<num<<endl;
 }
}

// 为什么#include<string.h> 显示编译错误?

请回答我,,

原文:http://www.cnblogs.com/mycapple-zgs-111411/p/4872680.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!