cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
bool array
bool array
Sep 1, 2012 at 9:11pm UTC
kaseron
(124)
Is it possible to have an array of bools?
like this:
bool
array[5][5];
Sep 1, 2012 at 9:12pm UTC
vlad from moscow
(6539)
No problem. Also you can use a vector of bools: std::vector<bool>
Sep 1, 2012 at 9:13pm UTC
kaseron
(124)
Thanks!
Sep 1, 2012 at 9:14pm UTC
Dash
(126)
You can use a bitset too, but it's primarily used for optimization.
Sep 1, 2012 at 11:27pm UTC
vlad from moscow
(6539)
Also I would like to append that you may not declare only arrays of void, references and functions (though you may declare an array of function pointers).
Topic archived. No new replies allowed.