Update main.cpp

This commit is contained in:
Anthony Wang 2020-05-26 18:34:00 +00:00 committed by repl.it user
parent dc1a7d52b8
commit fd36c741cf

View file

@ -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);