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
String/Data to Array
String/Data to Array
Oct 9, 2008 at 5:29pm UTC
smallsky
(1)
Goal: To store data in an array.
What:
Given a list of data say something like this
George 57 87
Adam 84 57
Mike 23 59
I want to put this into an array where each element is a name or a number. Is there a way to do that by a command to do something like put each thing in an array that is seperated by whitespace, or is there a better way to approach it?
Oct 9, 2008 at 7:13pm UTC
firedraco
(6247)
Use a map (or a vector of pairs, but the map is better for this).
Topic archived. No new replies allowed.