cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
C++11 -- std::array
C++11 -- std::array
Oct 28, 2011 at 7:19pm UTC
strongdrink
(468)
I'm having a little trouble understanding std::arrays, could someone give me an example?
http://en.cppreference.com/w/cpp/container/array
Oct 28, 2011 at 7:29pm UTC
Athar
(4466)
Arrays are containers with a constant size indicated by the second template parameter.
So
array<
int
,40> field;
creates an array with 40 int elements.
Oct 28, 2011 at 7:50pm UTC
strongdrink
(468)
Thank ye! I think I like C++0x/11 ...
for
(
auto
i : array) {
:D
Topic archived. No new replies allowed.