Quote Originally Posted by FenixRising View Post
I have looked at the documentation and have changed my program. I am assuming that cstr is a pointer and that pointer arithmetic should work. But, I still have errors.
You still don't get the idea. You have to refer to documentation in every case when you face a problem.

Error 1 error C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. - Which include file is strcpy_s in?
As long as you intend to just output the result of toupper, you never need this extra copy. Iteration along the original string, STL or plain C, whatever, will do for you.

Error 2 error C2664: 'int toupper(int)' : cannot convert parameter 1 from 'const char *' to 'int' 35 1
Another lesson: Learn to understand compiler messages. This one literally hints you on type incompatibility. The function wants input of int, but you provide pointer to char. Dereferencing the pointer might do the trick. Or using array-style access to string chars would work even better.

The article toupper provides some sample you have to think over.

cout << toupper(cstr + i);
Another unpleasant surprise waits yet behind the corner. toupper returns int, so you're going to have a chain of char decimal codes here as the console print out. What would be your next move?