seanmccully
asked on
Visual Studio 2008 C++ cannot convert parameter 2 from
I am getting the following compiler error in Visual Studio C++ that I am stumped on.
cannot convert parameter 2 from 'std::vector<_Ty>' to 'std::vector<_Ty> *'
with
1> [
1> _Ty=std::string
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Whats the correct way to do this?
cannot convert parameter 2 from 'std::vector<_Ty>' to 'std::vector<_Ty> *'
with
1> [
1> _Ty=std::string
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Whats the correct way to do this?
std::vector<std::string> tokens;
Tokenize(parameterArr[i]->Text,tokens);
void Tokenize(const String^ str,std::vector<std::string*>& tokens) {
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...sorry, correction:
void Tokenize(const String^ str,std::vector<std::string>& tokens) {
std::vector<std::string> tokens;
then try changing the second parameter of the Tokenize function to std::vector<std::string>& tokens, e.g.:
Open in new window