Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char guess[100];
- char word[] = "hello";
- char game[] = "-----";
- ...
- cin >> guess;
- for(int i=0; i < word.length(); ++i) {
- if (guess[i] == word[i]) {
- game[i] = word[i];
- }
- else {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement