- Joined
- 10/22/11
- Messages
- 66
- Points
- 18
Say I want to parse a bunch of std::string.
I am opened to:
- C++11
- Boost
- Regex
What are your suggestions?
I am opened to:
- C++11
- Boost
- Regex
Code:
// Ed_at_QN.cpp
//
// Powered by the QN Team Spirit
//
#include <string>
#include <vector>
#include <iostream>
// other system includes when required
int main()
{
// The data to be parsed
// YYYY-MM-DD,Date,Open,High,Low,Close,Volume,Adj.Close
std::vector<std::string> vStrings;
vStrings.push_back("2013-02-01,54.87,55.20,54.67,54.92,2347600,54.92");
vStrings.push_back("2013-01-31,54.74,54.97,53.99,54.29,3343300,54.29");
vStrings.push_back("2013-01-30,54.84,55.35,54.68,54.68,2472800,54.68");
/* Do all that is needed for outputting to the console the following table:
| Date Adj.Close
-----------------------------
| 02/01/2013 54.92
| 01/31/2013 54.29
| 01/30/2013 54.68
*/
return 0;
}
What are your suggestions?