kbhit()
getch()
//word = "Hello"; //Funtion is working fine but when I press a key it doesnot enter if(kbhit()) loop. //Moreover, I tried _getch() next to "if" loop statement but _getch() is also not working :( void Game::Print_LetterBox(int x,int y,char* word) { int size = strlen(word); char key; if(_kbhit()) { key = _getch(); } for(int i=0;i<size;i++) { Letter_Box( word[i],x + i*34,y,"purple"); for(int j=0;j<size;j++) { if(word[j] == key) Letter_Box( word[i],x+i*34,y,"red"); } } Animated_Character( x + size*34, 540 , 5); }
if
while
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)