How we can limit input data ? For example we only want the user to input 4 characters, user only can write up to 4 characters. Thank you fot your help.
akira_shinizaki
0
Newbie Poster
Recommended Answers
Jump to PostBy reading each character one at a time. If you get to 5 and that character is not '\n', print an error and clear out the rest of the characters from the input buffer.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.