target.cpp:10:12: error: missing template arguments before 'msg'
vector msg {"people", "cat", "dog", "chair", "cup"};
^~~
target.cpp:12:31: error: 'msg' was not declared in this scope
for (const string& word : msg)
正确的写法:
vector msg {"people", "cat", "dog", "chair", "cup"};
改为:
vector<string> msg {"people", "cat", "dog", "chair", "cup"};