bit behind, so much work

This commit is contained in:
Benjamin Kyd
2020-12-06 00:31:14 +00:00
parent 7e353fc760
commit 77ecdee0f8
66 changed files with 12636 additions and 11133 deletions

View File

@@ -1,53 +1,53 @@
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
std::vector<int> tokenise( std::string input )
{
std::stringstream ssInput( input );
std::vector<int> stream;
std::string s;
while( std::getline( ssInput, s, ',' ) ) {
stream.push_back( std::stoi( s ) );
}
return stream;
}
class IntCodeCPU
{
public:
IntCodeCPU();
std::vector<int> Program;
int ProgramCounter;
void SetProgram( std::vector<int> program )
{
Program = program;
}
void RegisterOpcode( int opcode )
{
}
};
int main(int argc, char** argv)
{
std::ifstream infile( argv[1] );
std::string input;
std::getline( infile, input );
std::vector<int> program = tokenise( input );
}
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
std::vector<int> tokenise( std::string input )
{
std::stringstream ssInput( input );
std::vector<int> stream;
std::string s;
while( std::getline( ssInput, s, ',' ) ) {
stream.push_back( std::stoi( s ) );
}
return stream;
}
class IntCodeCPU
{
public:
IntCodeCPU();
std::vector<int> Program;
int ProgramCounter;
void SetProgram( std::vector<int> program )
{
Program = program;
}
void RegisterOpcode( int opcode )
{
}
};
int main(int argc, char** argv)
{
std::ifstream infile( argv[1] );
std::string input;
std::getline( infile, input );
std::vector<int> program = tokenise( input );
}