Here is the process with very hard working but I don't know where am i getting wrong!Code:/* pupose: picking the character from the chunk of text, then analyst what type of that token is */ #include <iostream> #include <cctype> #include <string> #include <cstdlib> using namespace std; const int max = 1000; int type(char block[],int pos); // type of the token void getword(char block[], char token[], int &pos); void getnumber(char block[], char token[], int &pos); void print(char token[],int type); void getpunc(char block[], char token[], int &pos); bool gettoken(char block[],char token[], int &type,int &pos); int main() { int type; int pos = 0; char block[1000]= "Writing code is extremely hard!"; system("PAUSE"); return 0; } int type(char block[],int pos) { if(isalpha(block[pos])) return 1; if(isalnum(block[pos])) return 2; if(ispunct(block[pos])) return 3; } //Realize the word is the type void getword(char block[], char token[], int &pos) { int i, type; while(isalpha(block[pos])) { token[i]=block[pos]; i++; pos++; token[i] = '\0'; } } //Realize the number is the type void getnumber(char block[], char token[], int &pos) { int i,type; while(isalnum(block[pos])) { block[pos]= token [i]; i++; pos++; token[i]='\0'; } } //Realize the punctuation is the type void getpunc(char block[], char token[], int &pos) { int i, type; while(ispunct(block[pos])) { block[pos] = token[i]; i++; pos++; token[i]='\0'; } } bool gettoken(char block[],char token[], int &type,int &pos) { token[0] = block[pos]; token[1] = '\0'; type = 1; pos++; if ( pos >strlen(block)) return true; else return false; } void print(char token[],int type) { for(int i = 0; i < type; i++) cout<<token<<" "<<type<<endl; }