开发者

Error: Declaration terminated incorrectly

开发者 https://www.devze.com 2022-12-29 09:06 出处:网络
I get the error in this part of the code: void baklanges(list<MataIn> lista); { int n = text.length();

I get the error in this part of the code:

void baklanges(list<MataIn> lista);
{
int n = text.length();
for (int i = 0; i < n/2; i++) {
   char temp = text.at(i);
   text.at(i) = text.at(n-1-i);
   text.at(n-1-i)= temp;
}
cout<<"Texten baklanges:\n"<<text<<endl;
}

I don't see any problem in the code,does any of yo开发者_高级运维u?


Remove this semicolon.

void baklanges(list<MataIn> lista);
                                  ^
0

精彩评论

暂无评论...
验证码 换一张
取 消