问题描述
我从编译此代码得到此错误。有人能弄清楚吗? ps:我想制作一个在输入数字
#include <iostream>
#include <string>
using namespace std;
int main(){
std::string number;
int lenght;
int i,j;
int counter;
char storage;
do{
std::cin>>number;
lenght = number.length();
counter = 0;
int i = 0;
int j = 1;
while(counter<lenght){
counter++;
if(number(i)>=number(i+1)){}
else{
number(i) = storage;
number(i)= number(i+1);
number (i+1) = storage;
i++;
}
}
}while(lenght=>1);
}
错误代码: 18 15 D:\ IT \ C ++ \ s1093556_LAB5.cpp [错误]没有匹配到对'(std :: string {aka std :: basic_string})(int&)'的调用 18 15 D:\ IT \ C ++ \ s1093556_LAB5.cpp [错误]没有匹配到对'(std :: string {aka std :: basic_string})(int&)'的调用 20 13 D:\ IT \ C ++ \ s1093556_LAB5.cpp [错误]调用'((std :: string {aka std :: basic_string})(int&)'没有匹配项 21 13 D:\ IT \ C ++ \ s1093556_LAB5.cpp [错误]调用'((std :: string {aka std :: basic_string})(int&)'没有匹配项 21 26 D:\ IT \ C ++ \ s1093556_LAB5.cpp [错误]调用'((std :: string {aka std :: basic_string})(int)'不匹配 22 16 D:\ IT \ C ++ \ s1093556_LAB5.cpp [错误]没有匹配到对'(std :: string {aka std :: basic_string})(int)'的调用
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)