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?

Dave is getting lazy. ;)

>Thanks!
Anytime. But you still lack impatience and hubris, start working on that. But if you become too much like me I'll be forced to smite you, lest you hinder my plans for world domination.

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.