Skip to main content
Email Password   helpLost your password?
Unanswered questions View unanswered questions in the C / C++ / MFC forum     RSS: RSS Feed
Home > Forums > C / C++ / MFC

You must Sign In to use this message board.
 
 
Per page  Date Filter 
 FirstPrevNext
AnswerRe: multi midea timers with windows timer Pin
Stuart Dootson
22:11 2 Dec '08  
Questioncovert to upper Pin
jonig19
17:15 2 Dec '08  
AnswerRe: covert to upper Pin
Maximilien
17:29 2 Dec '08  
AnswerRe: covert to upper Pin
Manish K. Agarwal
19:01 2 Dec '08  
GeneralRe: covert to upper Pin
jonig19
20:20 2 Dec '08  
GeneralRe: covert to upper Pin
enhzflep
20:38 2 Dec '08  
GeneralRe: covert to upper Pin
Jijo raj
8:12 3 Dec '08  
I hope you are doing some C/C++ string exercises. Smile Well, I've modified the program for you. It converts small to caps, ignore capital and numbers and converts all symbols to space. Please have a look at it.

void ConvertToUpper ( char name[] )
{
cin >> name ;
int i = 0;

// Iterate upto end of string.
while(name[i] != '\0')
{
// Check whether its small letter.
if( name[i] >= 'a' &&
name[i] <= 'z' )
{
// Convert it to capital.
name[i] -= 32;
}

// Check for symbols. if found, convert as space.
// Check whether its not alphabet
else if (( name[i] < 'A' ||
name[i] > 'Z'))
{
// And ensure its not number.
if( name[i] < '0' ||
name[i] > '9' )
{
// Then its a symbol. So assign it as space.
name[i] = ' ';
}
}

i++;
}
}


I just thought about my old C/C++ string lessons. Big Grin

Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

Sign In·View Thread·PermaLink
AnswerRe: covert to upper Pin
Stuart Dootson
22:05 2 Dec '08  
AnswerRe: covert to upper Pin
DavidCrow
6:01 3 Dec '08  
Questionsystem in windows ce Pin
arifliminto86
16:58 2 Dec '08  
QuestionHow does this translate to c++ Pin
monsieur_jj
16:40 2 Dec '08  
AnswerRe: How does this translate to c++ Pin
Stuart Dootson
22:01 2 Dec '08  
QuestionWhich is the best C++ ERP development toolkit ? Pin
sumeet123
10:02 2 Dec '08  
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
toxcct
10:11 2 Dec '08  
JokeRe: Which is the best C++ ERP development toolkit Pin
CPallini
10:17 2 Dec '08  
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
Cedric Moonen
21:08 2 Dec '08  
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
Stuart Dootson
21:56 2 Dec '08  
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
toxcct
22:17 2 Dec '08  
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
Stuart Dootson
22:59 2 Dec '08  
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
toxcct
23:07 2 Dec '08  
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
Stuart Dootson
23:36 2 Dec '08  
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
toxcct
23:37 2 Dec '08  
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
sumeet123
2:27 3 Nov '09  
QuestionDifference between MFC and windows form application Pin
frankis78
9:10 2 Dec '08  
AnswerRe: Difference between MFC and windows form application Pin
toxcct
9:29 2 Dec '08  


Last Updated 9 Aug 2007 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009