How do I run a C++ program on itself?
For example, if I wanted to change all lower case letters to upper case, and I create the following program as a Win32 Console App:
#include <stdio.h>
#include <ctype.h>
int main(void)
{
int c;
for ( ; ; )
{
c = getchar();
if (c == EOF)
break;
if (islower(c))
c = toupper(c);
putchar(c);
}
return 0;
}
How can I actually run the change lowercase letters to uppercase letters on the actual program as the output to teh console window?
you would have to open the .cpp file using fstream read all the chars in change them to upper as needed and print them out.