I kind of understand what the error means, it almost appears like a logic error, but I'm not sure.. When I place a semi-colon where it asks me to, it doesn't initialise with the strings.. But when I run this code on cpp.sh it works wonderfully..?
The constructor that accepts an initializer_list was instroduced in c++11. So your compiler is probably outdated or you need to add a compiler flag like -std=c++11.