Hello, First of all I want to thank all the help with my posts.
I have a program where I have to convert a phrase from lower case to upper case, but I cannot use any of the toupper() isupper() functions and vice versa.
I think I almost got it, but I know my for loop for the conversion is incorrect.
Here is my code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
char beach[] = "Take me to Clearwater Beach!";
cout << "Initial Phrase: " << beach << endl;
for (char *i = beach; *i != '\0'; ++i)
{
if( i >= "a" && i <= "z")
i += 32;
++i;
}
cout << "\n";
cout << "New Phrase: " << beach << endl;
return 0;
}
My for loop has to be incorrect, it's not doing any of the arithmetic.
Thanks again!