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
getting info from strings...
getting info from strings...
Sep 11, 2010 at 5:23pm UTC
kyle11778
(192)
i need help/suggestions on how to get month,day,year from an input of "12/31/2010"
this is part of my homework so dont tell me just get me in the right direction...
thanks for the help!
Sep 11, 2010 at 5:39pm UTC
R0mai
(730)
Look into these links :
http://www.cplusplus.com/reference/string/string/find/
http://www.cplusplus.com/reference/string/string/substr/
http://cplusplus.com/articles/numb_to_text/
Sep 11, 2010 at 5:44pm UTC
kyle11778
(192)
what about this:
http://www.cplusplus.com/reference/clibrary/ctime/strftime/
Sep 11, 2010 at 6:03pm UTC
kyle11778
(192)
got it myself from this web page...
http://stackoverflow.com/questions/308390/convert-a-string-to-a-date-in-c
used:
sscanf(test, "%d/%d/%d", &day, &month, &year);
thanks anyways...later
Sep 11, 2010 at 6:07pm UTC
curioustoknow
(32)
Maybe you can use getline
Topic archived. No new replies allowed.