[skip ci] Update README

This commit is contained in:
ado 2023-08-05 23:57:57 +02:00
parent f17a3bdc59
commit 0e184d07ce

View File

@ -27,7 +27,6 @@ Lets say we have a csv file containing students in a given format '$name,$age,$g
$ cat students.csv
James Bailey,65,2.5
Brian S. Wolfe,40,1.9
Nathan Fielder,37,Really good grades
Bill (Heath) Gates,65,3.3
```
```cpp
@ -35,13 +34,11 @@ Bill (Heath) Gates,65,3.3
#include <ss/parser.hpp>
int main() {
ss::parser p{"students.csv", ","};
ss::parser<ss::throw_on_error> p{"students.csv", ","};
for(const auto& [name, age, grade] : p.iterate<std::string, int, float>()) {
if (p.valid()) {
for (auto&& [name, age, grade] : p.iterate<std::string, int, float>()) {
std::cout << name << ' ' << age << ' ' << grade << std::endl;
}
}
return 0;
}