简体   繁体   English

错误:声明未正确终止

[英]Error: Declaration terminated incorrectly

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 you? 我在代码中看不到任何问题,你们有吗?

Remove this semicolon. 删除该分号。

void baklanges(list<MataIn> lista);
                                  ^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM