-
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Can you please provide also the code that generates the compilation error? |
Beta Was this translation helpful? Give feedback.
-
A simple modification to the example rootMenu -> Insert(
"answer",
[](std::ostream& out, int x, std::vector<std::string> strs){ out << "The answer is: " << x << "\n"; },
"Print the answer to Life, the Universe and Everything " ); |
Beta Was this translation helpful? Give feedback.
-
Unfortunately mixing As a workaround, you can use the first parameter of the vector as an int, by converting it from However, if you think this can be a useful feature, you can open an issue with a feature request (maybe you can also consider sponsoring the project using the heart icon on top of the page to speed up this development). |
Beta Was this translation helpful? Give feedback.
Unfortunately mixing
std::vector<std::string>
with other parameter types is not currently supported.As a workaround, you can use the first parameter of the vector as an int, by converting it from
string
in your code.However, if you think this can be a useful feature, you can open an issue with a feature request (maybe you can also consider sponsoring the project using the heart icon on top of the page to speed up this development).