Initialize empty vector in structure - c++

c++, vector

Solution

Both `std::string` and `std::vector<T>` have constructors initializing the object to be empty. You could use `std::vector<unsigned char>()` but I'd remove the initializer.

Problem

I have a `struct`: ``` typedef struct user { string username; vector<unsigned char> userpassword; } user_t; ``` I need to initialize `userpassword` with an empty `vector`: ``` struct user r={"",?}; ``` What should I put instead of `?`?

Original source