#include <iostream>
using namespace std;
int main(void)
{
char* str = "joom";
*str = 'z';
cout << str << endl;
return 0;
}
/*
for above string manipulation
Borland compilers show no error message
but for the VC++6.0 compiler under visual enviroment,
it has been reported that it makes error message
in run time. printing no string on screen and shows
query dialog box if the user would like to report this
error to Microsoft.
Some one says it is syntax error to modify constant
string of "joom".
But why there isn't any error message during compilation,
and wonder how to explain the state of no error message for the same source under command line enviroment.
I would appreciate to the good advisor.
Thank your for your attentions.
*/
using namespace std;
int main(void)
{
char* str = "joom";
*str = 'z';
cout << str << endl;
return 0;
}
/*
for above string manipulation
Borland compilers show no error message
but for the VC++6.0 compiler under visual enviroment,
it has been reported that it makes error message
in run time. printing no string on screen and shows
query dialog box if the user would like to report this
error to Microsoft.
Some one says it is syntax error to modify constant
string of "joom".
But why there isn't any error message during compilation,
and wonder how to explain the state of no error message for the same source under command line enviroment.
I would appreciate to the good advisor.
Thank your for your attentions.
*/