BlockLune / blocklune.github.io

My blog powered by Hexo.
https://fishg.top/
4 stars 0 forks source link

Uses std::cin.ignore() to keep the user typing until the input meets the requirements | Fish Pond #1

Open BlockLune opened 1 year ago

BlockLune commented 1 year ago

https://fishg.top/posts/f96b3358.html?#more

I used to control users’ input by making the input a string and process it later. But today, my friend posed this question to me: Can we control input without a char array or string class?