What's the size of that vector, anyway?
rachelbythebay.com
rachelbythebay.com
vector<int> v{3} size() 1
vector<string> v{3} size() 3
vector<int> v{0} size() 1
terminate called after throwing an instance of
'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)
Can anyone explain why there's a logic error?[1] https://news.ycombinator.com/from?site=rachelbythebay.com