I am new to C++ and have problem that isn't adequately addressed in books and online. Say have have a program doing salaries. In this program all inputs should be numeric. If they aren't the program won't execute properly and you will never know it. Using the cin.clear and the cin.ignore functions one would detect "input garbage" (non-numeric inputs) and ask for correct inputs. Exactly how?
sgbartley 0 Newbie Poster
Dave Sinkula 2,398 long time no c Team Colleague
Narue 5,707 Bad Cop Team Colleague
Dave Sinkula 2,398 long time no c Team Colleague
Narue 5,707 Bad Cop Team Colleague
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.