问题描述
我无法找到错误的解决方案与“操作员
下面是我的代码所产生的错误,
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
std::cin >> t;
while(t--) {
long int i,n,count=0,idx,min=LONG_MAX;
cin >> n;
long int s[n];
for(i = 0; i < n; i++) {
cin >> s[i];
if(s[i] <= min) {
min = s[i];
idx = i;
}
}
cout << "count= " << count << " max= " << max << " idx= " << idx << "\n";
}
}
我遇到类似的错误
prog.cpp: In function ‘int main()’: prog.cpp:19:43: error: no match
for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and
‘<unresolved overloaded function type>’)
cout<< "count= "<< count << " max= " << max << " idx= " << idx <<"\n";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
有人可以帮我解决这个问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)