aboutsummaryrefslogtreecommitdiff
path: root/src/01b.cpp
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2023-12-01 21:37:56 +0100
committerThomas Schmucker <ts@its1.de>2023-12-01 21:37:56 +0100
commit3b9678982f745acf5f94f88ac6e4eb9cb824a806 (patch)
tree404cc1afc8d9dc5ec190624c7c71321c658ca928 /src/01b.cpp
parent9a164c3f65c01e31a9d1a8578e29b358972ddfed (diff)
downloadadvent-of-code-3b9678982f745acf5f94f88ac6e4eb9cb824a806.tar.gz
advent-of-code-3b9678982f745acf5f94f88ac6e4eb9cb824a806.tar.bz2
advent-of-code-3b9678982f745acf5f94f88ac6e4eb9cb824a806.zip
Aufräumen
Diffstat (limited to 'src/01b.cpp')
-rw-r--r--src/01b.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/01b.cpp b/src/01b.cpp
index f87da3a..91ba7b7 100644
--- a/src/01b.cpp
+++ b/src/01b.cpp
@@ -6,18 +6,6 @@
6#include <vector> 6#include <vector>
7using namespace std; 7using namespace std;
8 8
9string
10replace_all(string str, const string search, const string with)
11{
12 for ( ;; ) {
13 auto it = str.find(search);
14 if ( it == string::npos )
15 break;
16 str.replace(it, search.length(), with);
17 }
18 return str;
19}
20
21int 9int
22main() 10main()
23{ 11{
@@ -45,7 +33,7 @@ main()
45 33
46 fstream input{ "data/01a.txt" }; 34 fstream input{ "data/01a.txt" };
47 35
48 int sum = 0; 36 auto sum = 0;
49 for ( string line; input >> line; ) { 37 for ( string line; input >> line; ) {
50 string sub; 38 string sub;
51 vector<int> digits; 39 vector<int> digits;