Test if vector has even amount of elemen
Test if vector has even amount of elements
Mar 8, 2014 at 6:08pm UTC
closed account (
I would like to know an if statement that will test if there are even amount of element in a vector.
LoL just figured it out:
(storage.size()%2 == 0)
Last edited on
Mar 8, 2014 at 6:10pm UTC
Topic archived. No new replies allowed.
General C++ Programming
© cplusplus.com, 2000-2015 - All rights reserved -
Spotted an error? contact us