I can do a simple array of sets:
set < char > * words = new set < char > [10]
How I can do a vector of sets?
This results in a compiler error:
vector < set< char >> v
.
Thank you for answers!
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
Instead of '>>' try '> >'... like so:
If
vector < set< char >> v
is exactly what you've got there (I hope you cut and pasted), you've run into one of the annoying little features of C++.Those
>>
look to you like two closing angle brackets for two templates. They look like a right shift operator to the compiler. Change them to> >
with a space in between.Fortunately, this is being addressed in the C++ standard that should be ratified this year. Unfortunately, you aren't working with a C++11-compliant compiler just now.