foo.cc: In function 'int main()':
foo.cc:45:23: error: no matching function for call to 'count(char [100], char [100], int&, int&)'
num=count(t,s2,L,n1);
^
foo.cc:13:5: note: candidate: int count(char*, int, char*, int) <near match>
int count(char s1[],int n1,char s2[],int n2)
^~~~~
foo.cc:13:5: note: conversion of argument 3 would be ill-formed:
foo.cc:45:23: error: invalid conversion from 'int' to 'char*' [-fpermissive]
num=count(t,s2,L,n1);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/7/bits/stl_algo.h:4076:5: note: candidate: template<class _IIter, class _Tp> typename std::iterator_traits<_Iterator>::difference_type std::count(_IIter, _IIter, const _Tp&)
count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
^~~~~
/usr/include/c++/7/bits/stl_algo.h:4076:5: note: template argument deduction/substitution failed:
foo.cc:45:23: note: candidate expects 3 arguments, 4 provided
num=count(t,s2,L,n1);
^
foo.cc:35:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&x);
~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务