hi
i'm making a console hangman game
my problem is that i cant show the results after each user input
anyone know how this is done?
Code:#include <string> #include <memory.h> #include <conio.h> int main() { char string[30]="program"; char *pointer1=string; char temp[30]=" \0"; char *pointer2=temp; char ansver; for(cin>>ansver;ansver!='q';cin>>ansver) for(int i=0;i<strlen(string);i++) { if(pointer1[i]==ansver) { pointer2[i]=pointer1[i]; } } cout<<"result: "<<temp; // if i would try this up in the loop //it would just show the result several //times system("pause"); return 0; }