Click here to Skip to main content
15,912,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SSL, Bandwidth, & High Latency... Pin
Peter Weyzen30-Mar-07 10:25
Peter Weyzen30-Mar-07 10:25 
GeneralRe: SSL, Bandwidth, & High Latency... Pin
Mike O'Neill30-Mar-07 14:51
Mike O'Neill30-Mar-07 14:51 
GeneralRe: SSL, Bandwidth, & High Latency... Pin
Mark Salsbery31-Mar-07 6:55
Mark Salsbery31-Mar-07 6:55 
QuestionRegistry read operation fails on Vista Pin
Sameer_Thakur29-Mar-07 21:27
Sameer_Thakur29-Mar-07 21:27 
AnswerRe: Registry read operation fails on Vista Pin
_AnsHUMAN_ 29-Mar-07 21:51
_AnsHUMAN_ 29-Mar-07 21:51 
AnswerRe: Registry read operation fails on Vista Pin
Paresh Chitte29-Mar-07 23:14
Paresh Chitte29-Mar-07 23:14 
AnswerRe: Registry read operation fails on Vista Pin
Blake Miller3-Apr-07 6:59
Blake Miller3-Apr-07 6:59 
QuestionHow to check the ASCII value ?? Pin
Suresh H29-Mar-07 21:15
Suresh H29-Mar-07 21:15 
Hello All,

I am trying a read text file and extracting words from it and adding to a map.

I want to add only valid words and eliminate numbers and special character words and then add it to map.

Invalid words like 1word , hello# , t2o etc … so I want to eliminate all the number and special characters.

Can anyone please help me with this ….


strlwr(word);
wsize = strlen(word);
stemp = word;

for(int j =0; j<=wsize; j++)
{
if ( stemp[j] == '.' || stemp[j] == ';' || stemp[j] == '*' || stemp[j] == '#' && stemp[j] == '!' || stemp[j] == '@' || stemp[j] == '$' || stemp[j] == '%' && stemp[j] == '^' || stemp[j] == '&' || stemp[j] == '(' || stemp[j] == ')' && stemp[j] == '-' || stemp[j] == '+' || stemp[j] == '/' )
break;
else
FMap[stemp]=offset;
}

This conditions are very lengthy, is there any way I can reduce it by checking the ASCII value and add them to MAP.


Thanking you,
Suresh HC.
AnswerRe: How to check the ASCII value ?? Pin
Cedric Moonen29-Mar-07 21:20
Cedric Moonen29-Mar-07 21:20 
GeneralRe: How to check the ASCII value ?? Pin
Suresh H29-Mar-07 21:25
Suresh H29-Mar-07 21:25 
GeneralRe: How to check the ASCII value ?? Pin
Naveen29-Mar-07 21:41
Naveen29-Mar-07 21:41 
GeneralRe: How to check the ASCII value ?? Pin
ThatsAlok29-Mar-07 22:25
ThatsAlok29-Mar-07 22:25 
AnswerRe: How to check the ASCII value ?? Pin
Parthi_Appu29-Mar-07 21:29
Parthi_Appu29-Mar-07 21:29 
GeneralRe: How to check the ASCII value ?? Pin
Suresh H29-Mar-07 21:41
Suresh H29-Mar-07 21:41 
GeneralRe: How to check the ASCII value ?? Pin
Parthi_Appu29-Mar-07 21:50
Parthi_Appu29-Mar-07 21:50 
GeneralRe: How to check the ASCII value ?? Pin
Suresh H29-Mar-07 21:59
Suresh H29-Mar-07 21:59 
GeneralRe: How to check the ASCII value ?? Pin
Parthi_Appu29-Mar-07 22:03
Parthi_Appu29-Mar-07 22:03 
GeneralRe: How to check the ASCII value ?? Pin
Suresh H29-Mar-07 22:08
Suresh H29-Mar-07 22:08 
GeneralRe: How to check the ASCII value ?? Pin
Parthi_Appu29-Mar-07 22:13
Parthi_Appu29-Mar-07 22:13 
GeneralRe: How to check the ASCII value ?? Pin
Suresh H29-Mar-07 22:18
Suresh H29-Mar-07 22:18 
GeneralRe: How to check the ASCII value ?? Pin
Parthi_Appu29-Mar-07 22:22
Parthi_Appu29-Mar-07 22:22 
GeneralRe: How to check the ASCII value ?? [modified] Pin
Suresh H29-Mar-07 22:25
Suresh H29-Mar-07 22:25 
GeneralRe: How to check the ASCII value ?? [modified] Pin
Parthi_Appu29-Mar-07 23:17
Parthi_Appu29-Mar-07 23:17 
GeneralRe: How to check the ASCII value ?? Pin
toxcct29-Mar-07 23:24
toxcct29-Mar-07 23:24 
JokeRe: How to check the ASCII value ?? Pin
Parthi_Appu29-Mar-07 23:27
Parthi_Appu29-Mar-07 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.