Created
December 21, 2015 18:32
-
-
Save bioball/c26cf2274b32d2102347 to your computer and use it in GitHub Desktop.
AOC day 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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