📜  c++代码示例中的back()

📅  最后修改于: 2022-03-11 14:44:53.609000             🧑  作者: Mango

代码示例1
// my linkedin : https://www.linkedin.com/in/vaalarivan-prasanna-3a07bb203/
vector vec = {1, 2, 5, 6};
int ele = vec.back();  //ele = 6
//back() method does delete the last element from the vector, it just returns\n
//the last element.