17 lines
304 B
C++
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
|