Advent-of-Code/2022/11/main.cpp

30 lines
493 B
C++
Raw Normal View History

2022-12-20 15:46:56 -05:00
#include <fstream>
#include <iostream>
#include <set>
#include <string>
#include <vector>
int main()
{
std::ifstream ifs("data.txt");
if(!ifs.is_open())
{
std::cerr << "Missing data.txt." << std::endl;
return -1;
}
unsigned long total = 0;
unsigned long total_pt2 = 0;
for(std::string line; std::getline(ifs, line); )
{
if(line == "")
continue;
}
std::cout << " Total: " << total << std::endl;
std::cout << "PT2 Total: " << total_pt2 << std::endl;
return 0;
}