0
C++ arrays
In C++ is there a way to get the arrays length like in JS when you use .length. Thank you for your help.
5 Réponses
+ 6
Arrays don't really know their own sizes. Use std::vector, or std::array.
https://www.sololearn.com/learn/261/?ref=app
http://en.cppreference.com/w/cpp/container/array
+ 4
...For what you're doing, you can really just do...
cin >> arr2[0];
0
Well, is there a way to make arrays dynamic like, could I cin a int into a array?
0
So vecters are like the arrays in JS