salve a tutti ragazzi, ho provato a creare questo semplice programma in c++ che dovrebbe, presa una parola farla indovinare lettera dopo lettera o dare la possibilità di indovinarla direttamente,ma nel momento della compilazione mi da un errore che non riesco a capire.Grazie mille in anticipo
codice:#include <iostream>#include <string> using namespace std; int main() { char c[101]; char d[101]; char e='n'; char f; char h; char i[101]; int tentativis; int tentativie; bool g=false; cout<<"give me a word to find"; cin>>c; while(e=='n'){ cout<<"give me a letter"; cin>>f; while(c[i]!='/0'){ if (f==c[i]){d[i]=c[i]; bool g=true; cout<<d[i]; } i++; } if(g==true){tentativie++; g=false; }else{tentativis++;} cout<<" want you to give me the word? s/n"; cin>>h; if(h=='s'){cout<<"give me the word"; cin>>i; if(i==c){cout<<"right you are the winner"; break;}else{cout<<"you has wrong";} } cout<<"are you done? s/n"; cin>>e; } cout<<"the word was"<<c; cout<<tentativie<<"right attempts"; cout<<tentativis<<"attempts"; return 0; }