Skip to content

Passing Vectors arguments to the CLI #119

Answered by daniele77
yahya010 asked this question in Q&A
Discussion options

You must be logged in to vote

@yahya010 currently cli only supports basic types and a vector of strings.
So, you can't use std::vector<uint32_t>.
You have two alternatives:

  • if you have a fixed number of uint32_t parameters, you can explicit each argument
  • if you have a variable number of uint32_t, you can use astd::vector<std::string> and in your handle, you must convert each string into a uint32_t using e.g., stoul

However, soon cli will be able to manage user defined types. See this issue #69

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by daniele77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #118 on July 21, 2021 07:04.