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
Last element in vector
Last element in vector
Feb 28, 2014 at 12:11am UTC
heyyouyesyouiloveyou
(143)
Is there a way to say "while the value stored in the last element in the vector is greater than 9" in C++?
Last edited on
Feb 28, 2014 at 12:11am UTC
Feb 28, 2014 at 12:15am UTC
Catfish666
(666)
1
2
3
4
while
(v.back() > 9) {
// ...
}
http://www.cplusplus.com/reference/vector/vector/back/
Feb 28, 2014 at 12:17am UTC
heyyouyesyouiloveyou
(143)
thanks!
Topic archived. No new replies allowed.