Monday, May 24, 2010

C++ help In Write a program that prompts the user to input a string and outputs the string in uppercase lette

help on how this works

C++ help In Write a program that prompts the user to input a string and outputs the string in uppercase lette
The way I would basically approach this problem:





Have the user enter a string or c-string.





for (int i = 0; word[i] != '/0'; i++)


{


then inside the for loop try something like:





word[i] = word[i].toupper;


}





I never had to do this but try looking up toUpper in your book.





Epic
Reply:I reccomend reading your textbook, which will give you the knowledge you need to answer your homework question.
Reply:Ya i agree you need to get a book like i have the C++ for dummies
Reply:You will need to use std::cin, std::cout, std::string and string.toUpper.





Reference your textbook to figure out how they are used.
Reply:u have to use toupper


read it here


http://www.cplusplus.com/reference/clibr...


No comments:

Post a Comment