aocpp/intcode/src/Parser.cpp

17 lines
304 B
C++
Raw Normal View History

2022-11-04 09:38:01 -07:00
#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