Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to remove to an Array

#include <vector>
#include <iostream>

int main() {
  std::vector<int> v{1, 2, 3};
  v.pop_back();

  std::cout << v.size() << "
";
  std::cout << v.back() << "
";
}

Output:
2
2
Source by cppbyexample.com #
 
PREVIOUS NEXT
Tagged: #How #remove #Array
ADD COMMENT
Topic
Name
4+2 =