cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
String to Array
String to Array
Apr 16, 2012 at 6:41pm UTC
vckngs7
(89)
I am reading a file which has values separated by commas. In my program the file starts out as a string but I need it to be an array. What is an efficient way to turn the string into an array separated by the commas.
Apr 16, 2012 at 8:58pm UTC
LB
(13399)
While you can read from the file, use getline to get everything until a comma (,).
http://www.cplusplus.com/reference/string/getline/
Topic archived. No new replies allowed.