Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

back() in c++

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

//the last element.
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
4+9 =