aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;