| 96 | } |
| 97 | |
| 98 | vector<string> load_data() |
| 99 | { |
| 100 | ifstream datafile("data.txt"); |
| 101 | vector<string> v; |
| 102 | string line; |
| 103 | |
| 104 | if (datafile.fail()) |
| 105 | throw logic_error("could not find file"); |
| 106 | |
| 107 | while(getline(datafile, line)) |
| 108 | v.push_back(line); |
| 109 | |
| 110 | return v; |
| 111 | } |
| 112 | |
| 113 | regex key_value_pair("'([^\']*)'\\s*[:,]\\s*(\\d+(?:\\.\\d+)?|'[^']*')"); |
| 114 |