c++ template problem

前端 未结 4 1591
独厮守ぢ
独厮守ぢ 2021-01-25 20:00

i have a class which has a template by other purposes:

template
class MyClass {
    public: //of course public...
    t foo;
    std::string text;         


        
4条回答
  •  面向向阳花
    2021-01-25 20:37

    the text variable in your class is private so unless you bar function is a method of the class you can't legally use it like that

提交回复
热议问题