我在使用特定的代码时遇到了一些问题,如果有人能够就此问题启发我,我将非常感激,我已经在以下示例中将问题排除在外:
#include <iostream>
using namespace std;
class testing{
int test();
int test1(const testing& test2);
};
int testing::test(){
return 1;
}
int testing::test1(const testing& test2){
test2.test();
return 1;
}
Run Code Online (Sandbox Code Playgroud)
那么可能导致以下错误:
test.cpp:15:错误:将'const testing'作为'int testing :: test()'的'this'参数传递,丢弃限定符
非常感谢!