Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advice on contolling number of items passed into cin

Status
Not open for further replies.

Bystander

Technical User
Sep 4, 2001
112
GB
Hi,

I am learning c++ and have written an equation that takes 5 values into cin ( eg cin >>v>>w>>x>>y>>z) but I want to return an error mesage to the inputter if they pass in more that 5 items. Could anyone advise what syntax would be advisable for that please.

Many thanks

Bystander
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top