B
ben
Hi
Im gettting run time error (Unhandled exeption, access violations) when
executing the following code:
#include <conio.h>
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <stdlib.h>
int main()
{
char *t="test";
printf(t);
*t = toupper(*t); //error here
printf(t);
getch();
return 0;
}
I running it on VC++ 6
All I want to do is to convert a string to upper case. Am I missing
something here?
Thanks
Im gettting run time error (Unhandled exeption, access violations) when
executing the following code:
#include <conio.h>
#include <stdio.h>
#include <ctype.h>
#include <string>
#include <stdlib.h>
int main()
{
char *t="test";
printf(t);
*t = toupper(*t); //error here
printf(t);
getch();
return 0;
}
I running it on VC++ 6
All I want to do is to convert a string to upper case. Am I missing
something here?
Thanks