From 5e8a30937f4531b81ea0da55208ac33a113b3a70 Mon Sep 17 00:00:00 2001 From: fluffy Date: Tue, 18 Feb 2025 23:47:34 +0000 Subject: [PATCH] set regex --- 3/puzzle3.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/3/puzzle3.cpp b/3/puzzle3.cpp index f7bdcff..c8e29df 100644 --- a/3/puzzle3.cpp +++ b/3/puzzle3.cpp @@ -7,10 +7,18 @@ using namespace std; int main(int argc, char const *argv[]) -{ +{ + ifstream puzzle("puzzleInput", ifstream::in); + if(!puzzle){ + return 1; + } + + //regex + regex regexToSearch("(mul\(\d+,\d+\))") + string line; while (getline(puzzle, line)) {