Hello all, I am brand-spanking new to C++, but love it already (At work I sorta picked up vba, and I had a lot of fun with it and wanted to try a real language just to increase my understanding of programming, so here I am)! I do have a question on something so basic I feel that even I should be able to figure it out (but can't). I am attempting to take a string and convert the whole thing into upper case, for which I have written the following lines:
while (*str++) *str = toupper(*str) ..which I thought meant: make char at first address uppercase, then move to the next address; continue until null is reached. But, when I run the code, it converts all the elements but the very first one. I must be misunderstanding something here, but I am not sure what. Can anyone lend a hand here? "str" in this case is the name of the char array, so I thought it would return the address of the first element in the array... Any help would be appreciated
