我想在函数内创建一个字符串向量并在堆上为其分配内存。为此,我正在使用
vector<string>* residuetable = new vector<string>();
当我尝试做
&residuetable.push_back(modulo((exponentiate("2", exponent02)), modulus));
即尝试使用push_back函数将几个函数调用的返回值添加到向量,我得到编译时错误
request for member 'push_back' in 'residuetable', which is of non-class type 'std::vector<std::string, std::allocator<std::string> >*
如何解决这个问题并将函数调用的结果添加到堆上分配的向量的末尾?