UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
September
Su M Tu W Th F Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Sponsored Links
Latest Postings
The History Thread...
by Gremelin
Yesterday at 09:42 AM
Doom 3
by Cyrez
09/11/14 08:58 PM
Amazon Gift Card Generator/KeyGen?te
by Gecko666
08/22/14 09:21 AM
Latest Reviews
Topic Options
Rate This Topic
#17247 - 09/25/02 08:47 PM Input buffer
Skull Offline
UGN Elder

Registered: 03/01/83
Posts: 55
Loc: Iowa
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
_________________________
Trust me, if i started killing people, there'd None of you left

Top
Sponsored Links
      
#17248 - 09/26/02 06:11 AM Re: Input buffer
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
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
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top
#17249 - 09/29/02 08:34 PM Re: Input buffer
Skull Offline
UGN Elder

Registered: 03/01/83
Posts: 55
Loc: Iowa
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
_________________________
Trust me, if i started killing people, there'd None of you left

Top

Featured Member
Registered: 08/22/14
Posts: 1
Forum Stats
2148 Members
46 Forums
34470 Topics
69640 Posts

Max Online: 1567 @ 04/25/10 02:20 AM
Top Posters
UGN Security 27632
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Tim050, Gecko666, defghi795767, Devo60, ali
2148 Registered Users
Who's Online
1 registered (Gremelin), 305 Guests and 359 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!