c++ - error: no class template named 'rebind' in 'class std::basic_string<char>' -
i getting error when define function.i'm not using template class yet getting error.
#include <string> #include <vector> using namespace std; void myclass::setoptions(vector<std::string,std::string> opts) { // int size = opts.size(); // this->dropdown = new string[size][size]; }
and there no error in header file if declare function:
void setoptions(vector<string,string> );
std::vector<std::string, std::string>
should be:
std::vector<std::string>
(one dimension)- or
std::vector<std::vector<std::string>>
(two dimension).
the second template argument of std::vector
allocator use, , std::string
not allocator.
Comments
Post a Comment