https://ide.codingblocks.com/s/48641
when i run this code on online ide it runs fine.
But when I run it on the terminal in my computer, it shows the following error----
test.cpp:11:17: error: non-aggregate type ‘vectorstd::__1::string’ (aka ‘vector<basic_string<char, char_traits,
allocator > >’) cannot be initialized with an initializer list
vector searchIn= {
^ ~
test.cpp:15:17: error: non-aggregate type ‘vectorstd::__1::string’ (aka ‘vector<basic_string<char, char_traits,
allocator > >’) cannot be initialized with an initializer list
vector phone = { " ", " ", “abc”, “def”, “ghi”, “jkl”, “mno”, “pqrs”, “tuv”, “wxyz” };
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
Why is this ? Pls explain