expression must have class type
提示28行: expression must have class type
原因是,使用指针访问函数的时候应该 pointer->func(); 而我使用了 pointer.func()
本文解决了一个特定的编程错误:expressionmusthaveclasstype。该错误发生在使用指针调用成员函数时采用了错误的语法。正确的做法应当是使用pointer->func();而非pointer.func()。文章详细解释了这一问题并提供了修正方法。
expression must have class type
提示28行: expression must have class type
原因是,使用指针访问函数的时候应该 pointer->func(); 而我使用了 pointer.func()