EDIT: Didn't see the new[] Ouch. My bad, 100%.
Job well done on the program. However, when write is now called multiple times, each time it will allocate 100 bytes of memory to the pointer. This is called a memory leak. To fix that, make sure you only allocate the memory once (call new once).
Last edited by Clockowl; Aug 13th, 2008 at 11:44 am.