Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncovert to upper Pin
jonig192-Dec-08 16:15
jonig192-Dec-08 16:15 
AnswerRe: covert to upper Pin
Maximilien2-Dec-08 16:29
Maximilien2-Dec-08 16:29 
AnswerRe: covert to upper Pin
Manish K. Agarwal2-Dec-08 18:01
Manish K. Agarwal2-Dec-08 18:01 
GeneralRe: covert to upper Pin
jonig192-Dec-08 19:20
jonig192-Dec-08 19:20 
GeneralRe: covert to upper Pin
enhzflep2-Dec-08 19:38
enhzflep2-Dec-08 19:38 
GeneralRe: covert to upper Pin
Jijo.Raj3-Dec-08 7:12
Jijo.Raj3-Dec-08 7:12 
AnswerRe: covert to upper Pin
Stuart Dootson2-Dec-08 21:05
professionalStuart Dootson2-Dec-08 21:05 
AnswerRe: covert to upper Pin
David Crow3-Dec-08 5:01
David Crow3-Dec-08 5:01 
jonig19 wrote:
Why when entered, will it take John_Doe, and convert it to JOHN?DOE


Because that's what you've instructed it to do. Do the math. If the underscore's ASCII value is 95, then:

95 + (65 - 97) = 95 + (-32) = 63, which is the ASCII value of the question mark.

Perhaps you meant to do something like this which only affects lowercase letters:

while (name[i] != '\0')
{
    // all of this can be replaced with a call to toupper()
    if ((name[i] >= 'a') && (name[i] <= 'z'))
        name[i] = name[i] - ('a' - 'A');
 
    i++;
}


"Love people and use things, not love things and use people." - Unknown

"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch


Questionsystem in windows ce Pin
Arif Liminto2-Dec-08 15:58
professionalArif Liminto2-Dec-08 15:58 
QuestionHow does this translate to c++ Pin
monsieur_jj2-Dec-08 15:40
monsieur_jj2-Dec-08 15:40 
AnswerRe: How does this translate to c++ Pin
Stuart Dootson2-Dec-08 21:01
professionalStuart Dootson2-Dec-08 21:01 
QuestionWhich is the best C++ ERP development toolkit ? Pin
sumeet1232-Dec-08 9:02
sumeet1232-Dec-08 9:02 
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
toxcct2-Dec-08 9:11
toxcct2-Dec-08 9:11 
JokeRe: Which is the best C++ ERP development toolkit Pin
CPallini2-Dec-08 9:17
mveCPallini2-Dec-08 9:17 
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
Cedric Moonen2-Dec-08 20:08
Cedric Moonen2-Dec-08 20:08 
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
Stuart Dootson2-Dec-08 20:56
professionalStuart Dootson2-Dec-08 20:56 
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
toxcct2-Dec-08 21:17
toxcct2-Dec-08 21:17 
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
Stuart Dootson2-Dec-08 21:59
professionalStuart Dootson2-Dec-08 21:59 
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
toxcct2-Dec-08 22:07
toxcct2-Dec-08 22:07 
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
Stuart Dootson2-Dec-08 22:36
professionalStuart Dootson2-Dec-08 22:36 
GeneralRe: Which is the best C++ ERP development toolkit ? Pin
toxcct2-Dec-08 22:37
toxcct2-Dec-08 22:37 
AnswerRe: Which is the best C++ ERP development toolkit ? Pin
sumeet1233-Nov-09 1:27
sumeet1233-Nov-09 1:27 
QuestionDifference between MFC and windows form application Pin
frankis782-Dec-08 8:10
frankis782-Dec-08 8:10 
AnswerRe: Difference between MFC and windows form application Pin
toxcct2-Dec-08 8:29
toxcct2-Dec-08 8:29 
GeneralRe: Difference between MFC and windows form application Pin
frankis782-Dec-08 10:28
frankis782-Dec-08 10:28 

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.