My program stops working after I input the first letter. Why??? It works fine in C++.
void lines(string a, string aa[]){ for(int b=0;b<a.length();b++) cout<<aa[b]<<setw(5); } void check(string word, string a[],string answer){ for(int i=0;i<word.length();i++) if(answer.compare(word.substr(i,1))==0) a[i]=answer; } void win(string word, string a[], bool &w1){ for(int j=0;j<word.length();j++){ if(a[j].compare(word.substr(j,1))==0) w1=true; else w1=false; } }