Created
September 16, 2016 20:00
-
-
Save dmgerman/30872ee99943388229685c3d13014d6a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
int main() | |
{ | |
std::vector < // I want a vector | |
std::vector<double> // each element of the vector is a vector | |
> variableName // name of the vector | |
(5, // how many elements in the frist dimension | |
std::vector<double>(2) // It knows each element is a vector (the subvectors. Here we say exactly | |
// what size each subvector to create | |
); | |
std::cout << "Size first dimension : " << variableName.size() << std::endl; | |
std::cout << "Size second dimension : " << variableName[0].size() << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment