If I am not mistaken what you want to do is check that ALL the characters of the word are either letters or numbers, right? You could declare 3 bool variables to know if the word has letters, numbers and non-alpharithmetic characters. Iterate through the length of the word and set each bool variable in the appropriate way (if isalpha(current_char) is true, set the has_alpha bool, if isdigit(current_char) is true, set the has_digit bool and if !isalnum(current_char) set the has_non_alnum bool). Of course depending of the values of these 3 bool variables you can decide that the word is not valid and stop iterating if necessary. Now, that's one solution that came to me while reading your post. Maybe you can find something better.
Thank you very much for the advice. I will try digest what you have tell me. To tell you the truth, my C++ programming skill is around 2/10 if you grade me. I need time to digest them. And i tink i need to read my basics over and over again.
I will come back with post if I stuck with what you have posted. Thanks!
Thank you guys. I managed to solve my questions after sleepless night and crash course. Now I need to start with my task 2. woooo this is tough. I need to post a new thread regarding reading of text file. Haiz life is tough.