Code AnalysisHard 60s
Reference dangling after vector realloc
std::vector<std::string> v = {"a","b"};
const std::string& s = v[0];
v.push_back("long string forcing realloc");
std::cout << s;
What happens and why?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.