I'm having trouble pulling each character out to change each one to a lowercase letter
i.e. PAPER to paper
I'm having trouble pulling each character out to change each one to a lowercase letter
i.e. PAPER to paper
you'll need <cstdio>, <cstdlib>, <cstring> or the equivilent for your compiler.Code:char Array[] = "PAPER"; for(int i = 0; i < (int)strlen(Array); i++) { printf("%c", tolower(Array[i])); }
Last edited by taylorguitarman; 02-06-2002 at 04:10 AM.
c'mon this isn't hard:
#include <iostream>
using namespace std;
int main()
{
char tolower[] = "PAPER";
for (int i = 0; i < 5; i++)
{
tolower[i] |= 0x20;
cout<<tolower[i];
}
return 0;
}
Last edited by shtarker; 02-07-2002 at 02:11 AM.
Do u know of any good bit/hex operations tutorials on the net?
For a really good explanation you should probbly read the first chapter of Art Of Assembly. It mainly just goes over all the basics of binary and hex. Kind of like the stuff you some times do in a general computing course, only in detail not just breezing over it.
But i must say its not hard to understand how bit operations work. The tricky bit is knowing when to use them.
thanx