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, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
Our Sponsors

Latest Postings
Owning Servers
by Gizmo
08/25/08 10:21 AM
my old account still exists!
by Gizmo
08/19/08 02:27 PM
Burger King gone Wild!
by Gizmo
08/08/08 11:42 PM
PDX 2600
by rbcp
08/07/08 12:46 AM
The Pirate Bay- shut down?
by ZER0_DECEPTION
08/05/08 09:07 PM
Windows Events for Changing Access rights to a folder or a File
by Gizmo
08/05/08 12:32 PM
question about IE and CSS
by §intå×
08/04/08 08:51 PM
Server
by Gizmo
08/01/08 01:29 AM
Topic Options
#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
Our Sponsors
Sponsor Our Sponsors

Top  
#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



Forum Stats
6911 Members
44 Forums
10460 Topics
45198 Posts

Max Online: 677 @ 06/30/07 10:06 PM
Top Posters
Gizmo 6929
UGN Security 3436
§intå× 3250
IceMyst 1449
SilentRage 1273
Ice 1146
pergesu 1134
Infinite 1039
jonconley 954
Girlie 903
Newest Members
red queen, byopc, cybermox, NiPah, mcscrwdy25
6911 Registered Users
Who's Online
1 Registered (Gizmo), 11 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Latest News
Update Humpday - Aug 27, 2008
by Gizmo
Yesterday at 12:58 AM
Update Humpday - Aug 20, 2008
by Gizmo
08/21/08 01:48 AM
Update Humpday - Aug 14, 2008
by Gizmo
08/14/08 08:33 AM
Update Humpday - Aug 06, 2008
by Gizmo
08/06/08 08:05 AM
Update Humpday - Jul 30th, 2008
by Gizmo
07/31/08 11:17 AM


Donate

Get the Google FireFox Toolbar
Get Firefox!
Get FireFox!