Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Item
- {
- int a, b, c;
- Item(int a,int b,int c):a(a),b(b),c(c){}
- };
- int main(int argc, const char * argv[])
- {
- vector<Item> x;
- // x.push_back(1,2,3); <- не скомпилируется!
- x.emplace_back(1,2,3);
- }
- x.emplace_back(Item(0,1,2));
Add Comment
Please, Sign In to add comment