0
#include <iostream>
using namespace std;
template <class numtype>
class Compare
{
public:
numtype* x;
};
class test
{
public:
void fun(){
std::cout << "fun" << std::endl;
}
};
int main()
{
Compare<test> a;
a.x = new test();
a.x->fun(); // <-- this line
delete a.x;
return 0;
}
코드는 추가적으로 문제를 명확하게 보여주기 위해 추가적으로 나와 있습니다. 에서 fun()
을 클릭합니다. "Symbol not found : fun"이라는 오류 메시지가 나타납니다. 어떻게 수정해야합니까?소스 인사이트가 기호를 찾을 수 없습니다.
도움 주셔서 감사합니다. –