Creating A Vector

[Solved] Creating A Vector | Vb - Code Explorer | yomemimo.com
Question : how to create a vector in c++

Answered by : alex

// First include the vector library:
#include <vector>
// The syntax to create a vector looks like this:
std::vector<type> name;
// We can create & initialize "lol" vector with specific values:
std::vector<double> lol = {66.666, -420.69};
// it would look like this: 66.666 | -420.69

Source : | Last Update : Sat, 07 Mar 20

Question : Creating a Vector#

Answered by : sumit-rawal-ig4gaypbyn28

{"tags":[{"tag":"p","content":"Vectors can be created using the Vector keyword followed by ().\n "},{"tag":"p","content":""},{"tag":"p","content":""},{"tag":"textarea","content":"val numVector = Vector(1,2,3,4,5)\n\nnumVector.foreach(println)","code_language":"scala"}]}

Source : | Last Update : Tue, 30 May 23

Answers related to creating a vector

Code Explorer Popular Question For Vb