C
cppdev
What should happen if String contents are changed like below?
The contents do change and nothing crashed or anything.
String* str = S"hello";
Char __pin* ps = const_cast<Char*>(PtrToStringChars(str));
while(ps && *ps != 0)
(*ps++)='0';
Console::WriteLine(str);
The contents do change and nothing crashed or anything.
String* str = S"hello";
Char __pin* ps = const_cast<Char*>(PtrToStringChars(str));
while(ps && *ps != 0)
(*ps++)='0';
Console::WriteLine(str);