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
Arrays
Arrays
Nov 6, 2012 at 1:53am UTC
closed account (
Dy0fSL3A
)
If i have an array with a varied number of elements, say
1
2
// int j = 1000;
// string names[j] = {steve, brian, sean, kevin, jason};
I put j as a large number to represent the max # of elements i could have, but if I have less than that, such as in the example I have 5, is there any way I can store that number in an int?
Nov 6, 2012 at 2:44am UTC
TheIdeasMan
(6817)
Look up vectors.
Google C++ vector Example
This will take you to the reference section on the top left of this page.
Topic archived. No new replies allowed.