I am trying to make a program in C but am running into problems with my input buffer storing characters that i dont want it to store. Is their a simple way to wipe this buffer clean every time i run though the loop i have it going through?
Regards,
Skull
yeah, I had a problem with that in my buffer in my telnet router program. Here's what I did:
ZeroMemory(&buffer[0], 4096);
Full code found at:
ftp://serialcoders.sytes.net/Router/TelnetRouter_v3.0.zip
Thanks Mr. Rage
An Alternitvie solution that i found is the setbuf(); function in conjuncture with the fflush() funcition. The set buf allows you to use a user defined var as your inputbuffer with a size that you spefify. Then using the fflush() it will flush that buffer retruning the null character to the first slot.
Regards,
Skull