I was wondering why this causes a debug assertion failure in
MSVC6.0/EE/SP5:
void main()
int main(), don't believe VC6 that accepts void main().
{
char* p = "HELLO";
Also note that the memory pointed by p is non-modifiable (AFAIK, many Unix
compilers place it in some read-only-memory location but this is
implementation dependent). Attempting to modify it is undefined behavior.
Also note that calls to new and new [] operators should be properly matched
by a corresponding call to delete and delete [] operators respectively.
Failing to do so is another cause of Undefined Behavior.
Sharad