Last active
November 7, 2018 19:25
-
-
Save knapply/7c50ca13ba2a0d9097d9833225ac4cd8 to your computer and use it in GitHub Desktop.
#cpp #length2
This file contains 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> // std::cout, std::endl | |
#include <vector> // std::vector | |
using std::cout; | |
using std::endl; | |
using std::vector; | |
int main() { | |
vector<double> v{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }; | |
int result = size(v); | |
cout << "length: " << result << endl; | |
return 0; | |
} | |
//> length: 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment