Added AOC Project and created aoc2022.h
This commit is contained in:
26
src/aoc2022.h
Normal file
26
src/aoc2022.h
Normal file
@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include <fstream>
|
||||
|
||||
template <typename Output>
|
||||
struct SDay {
|
||||
std::string name;
|
||||
std::ifstream input;
|
||||
|
||||
//Constructor and Destructor
|
||||
SDay(std::string);
|
||||
~SDay();
|
||||
|
||||
virtual Output part1() const {};
|
||||
virtual Output part2() const {};
|
||||
};
|
||||
|
||||
template <typename Output>
|
||||
SDay<Output>::SDay(std::string name) {
|
||||
input.open("input/" + name, std::ios::in);
|
||||
}
|
||||
|
||||
template <typename Output>
|
||||
SDay<Output>::~SDay() {
|
||||
input.close();
|
||||
}
|
||||
|
7
src/main.cpp
Normal file
7
src/main.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include "aoc2022.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
int main() {
|
||||
|
||||
}
|
Reference in New Issue
Block a user