Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
general form of input an array using gets function
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
osama2351
New Member
Join Date:
Mar 2013
Posts:
1
#1
general form of input an array using gets function
Mar 13 '13, 11:38 AM
tell plz.
because i am in trouble!
suvarna271
New Member
Join Date:
Feb 2013
Posts:
19
#2
Mar 13 '13, 12:20 PM
This
http://megacplusplustutorials.blogsp...2/strings.html
might help
Comment
Post
Cancel
divideby0
New Member
Join Date:
May 2012
Posts:
131
#3
Mar 14 '13, 02:58 AM
gets is a horrible function as it doesn't check if input entered will fit in the buffer provided possibly corrupting your program or worse. Avoid it and any resource that suggests using it.
Use fgets.
Code:
char buffer[BUFSIZ]; fgets(buffer, sizeof buffer, stdin);
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment