I seem to be getting this error, but I am unsure how to solve it. It used to work, but now it doesn't. Error: Unhandled exception at 0x01101ad2 in SpamBot.exe: 0xC0000005: Access violation reading location 0x01116000.
size will always be 1. You are effectively dividing the same number by itself.
Also, you never stop 'i' from incrementing, so it will increment far beyond 'size', and far beyond the end of your buffer, and far into bad memory -- which is what is causing your program to crash.