it's part of c++ language
so why i get error?
show the error message
Invalid operands to binary expression ('vector<int>' and 'int')
space probably
no difference, but i can do this in QT
vector<int> vec(5) perhaps?
Vector isn't a QT thing
you can easily define an operator overload of operator<<. I don't use qt but it may have this defined someplace for it to compile.
maybe, but anyway thnx you guys
why you even need to do that there? vector vec = { 11, 12, 13 };
Re-invent the wheel instead of just pushing back lmao
I wondered too but perhaps it's important for him to Split Definition and declaration🤷♂
does jump to definition work for you, if yes you would want to use that on << or type operator<<(vec, l1); and jump to it
Обсуждают сегодня