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
November
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
Latest Reviews
Topic Options
Rate This Topic
#17247 - 09/25/02 11: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 09: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 11: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: 10/28/14
Posts: 1
Forum Stats
2151 Members
46 Forums
35767 Topics
70937 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 28928
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
HushHush, golqm, Tim050, Gecko666, defghi795767
2150 Registered Users
Who's Online
0 registered (), 412 Guests and 295 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
luxury goods sales at $405B by 2019
by golqm
10/28/14 05:19 AM


Donate
  Get Firefox!
Get FireFox!