im having trouble with my compiler
Im using codeblocks with gnugcc
and i want to do:
table.push_back({""});
and it says
main.cpp|22|error: expected primary-expression before '{' token|
code works in VS and other compilers... What the hell?
vector < car > AddCar()
{
int i;
vector < car > table;
string check;
table.push_back({""});
for (i = 0; i < table.size(); i++)
{
cout << "marka: ";
cin >> table[i].mark;
cout << "model: ";
cin >> table[i].model;
cout << "cena: ";
cin >> table[i].price;
cout << endl;
table.push_back(car());
...
yes i want an empty pushback