Well you got a strange compiler, mine outputs hello, hi...
Yeah I just ran it. So does mine.
allocating a new char is just a memory leak since the pointer gets overwritten in the next operation (se above post).
yeah thought as much. Anyway got the desired output ( but i know it is bad code). Tried calling delete on it, but that does not also work. Why is that?
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
Offline 1,559 posts
since Jun 2005