aocpp/intcode/src/Parser.cpp
Eric Mertens 346283bc8a warnings
2022-11-11 08:27:18 -08:00

17 lines
304 B
C++

#include <intcode/Parser.hpp>
#include <iostream>
namespace intcode {
auto ParseStream(std::istream &in) -> std::vector<ValueType> {
std::string str;
std::vector<ValueType> result;
while (std::getline(in, str, ',')) {
result.push_back(std::stol(str));
}
return result;
}
} // namespace