You can’t in C++.
One thing you can do is use a form of std::map<std::string, std::vector>
to store name to vector map.
More Related Contents:
- cin using char type array
- Where is C not a subset of C++? [closed]
- Are arrays Pointers? [duplicate]
- Separating class code into a header and cpp file
- Is it possible to declare two variables of different types in a for loop?
- Non-blocking console input C++
- std::cout won’t print
- C++0x lambda capture by value always const?
- error LNK2005, already defined?
- How do I input variables using cin without creating a new line?
- Why is protected constructor raising an error this this code?
- Variable declarations in header files – static or not?
- How to construct std::array object with initializer list? [duplicate]
- What happens when you deallocate a pointer twice or more in C++?
- Is it possible to initialize std::vector over already allocated memory?
- Update GCC on OSX
- Why can’t I add pointers?
- Since I can’t return a local variable, what’s the best way to return a string from a C or C++ function?
- How is heap and stack memories managed, implemented, allocated?
- Range based for-loop on array passed to non-main function
- Why doesn’t an if constexpr make this core constant expression error disappear?
- How might I wrap the FindXFile-style APIs to the STL-style Iterator Pattern in C++?
- Reference collapsing?
- C++ inheritance and member function pointers
- What am I allowed to do with a static, constexpr, in-class initialized data member?
- Calculate system time using rdtsc
- returning an abstract class from a function
- How to Run Only One Instance of Application
- Is substitution performed on a variadic parameter pack type if the pack is empty?
- __attribute__((format(printf, 1, 2))) for MSVC?