我收到一个编译器错误,上面写着
could not deduce template argument for 'std::vector<T*>&' from 'std::vector<_Ty>'
template <typename T> void foo(vector<T*>& a, int left, int right)
{
...
}
main()
{
...
//declare and instantiate 3 vectors
vector<int> intVector;
foo(intVector, 0, 100);
foo(doubleVector, 0, 100);
foo(charVector, 0, 100);
...
}