aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2020-05-26 18:34:00 +0000
committerrepl.it user2020-05-26 18:34:00 +0000
commitfd36c741cf4f19a83206635ddab2712557057a25 (patch)
tree649a409e516d7e278405888bfa78e8d8292b8b5d
parentdc1a7d52b8a02d245cd84a3d660fbd0e4cbbf564 (diff)
Update main.cpp
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 927685e..d07fbe1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -7,7 +7,7 @@ struct weightstruct
int word;
int clause;
int sentence;
- weightstruct(int a=100,int b=0,int c=0):word(a),clause(b),sentence(c){}
+ weightstruct(int a=0,int b=0,int c=0):word(a),clause(b),sentence(c){}
weightstruct operator + (const weightstruct& w) const
{
return weightstruct(word+w.word,clause+w.clause,sentence+w.sentence);
@@ -187,7 +187,7 @@ string gettextstring(int minw)
int main() {
init();
- for(auto x:text)
+ for(auto& x:text)
x.calcweight();
cout<<gettextstring(-10000);