Answers for "vector commands c++"

C++
1

how to use vectors c++

#include <iostream>
#include <vector>
using namespace std;

int main() {
  //vector element size
  const int size = 4; 
  //vector with int data type
  //all elements are equal to 4
  vector<int> myVect (size, 4);

  for (int i=0; i<size; i++) {
    cout << "Vector index(" << i <<") is: "<< myVect[i] << endl; 
  }
  return 0;
}
Posted by: Guest on October-31-2020
-1

vector commands

Start with 
    “Hey Vector!”

following by:
    “Explore around”
    “Do a trick”
    “Find your cube”
    “Do a back-flip”
    “Bring me your cube”
    “Pick up your cube”
    “Roll your cube”
    “Do a wheel-stand”
... or use "alexa" with alexa (amazon) commands.
Posted by: Guest on March-22-2021

Browse Popular Code Answers by Language