Skip to content

Instantly share code, notes, and snippets.

@bioball
Created December 21, 2015 18:32
Show Gist options
  • Save bioball/c26cf2274b32d2102347 to your computer and use it in GitHub Desktop.
Save bioball/c26cf2274b32d2102347 to your computer and use it in GitHub Desktop.
AOC day 3
//
// Created by Daniel Chao on 12/18/15.
//
#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <fstream>
using namespace std;
ifstream openfile(string src) {
ifstream file;
file.open(src);
return file;
}
int main(int argc, char** argv)
{
string src = argv[1];
string line;
ifstream *file = openfile(src);
while (getline(file, line))
{
cout << line;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment