Hi how to access standard input buffer to get 1 and second character from there?
for c++ there is a function named peek() but in c libraries I can find one...
cppgangster
-1
Junior Poster in Training
Recommended Answers
Jump to PostThere's no such feature in the stdio library. The best you can do is extract a character, then return it to the stream with ungetc, but that's probably sufficient for your needs. If you need to unget more than one character, some custom buffering will be required …
All 4 Replies
Narue
5,707
Bad Cop
Team Colleague
cppgangster
-1
Junior Poster in Training
Narue
5,707
Bad Cop
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
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.