How can I make a program that will read a different amount of input?

Nov 11, 2014 at 2:00am
I know you probably didn't understand the question, but let me rephrase it in a different way.

Let's say you have a program that has 5 variables that need to be assigned a value.

This program will ask you to input values for each of the 5 variables, but you only want to input values for 3 variables, is it possible to skip the other 2 variables in the program?

Is it even possible to make cin dynamic? if so, how?
Last edited on Nov 11, 2014 at 2:02am
Nov 11, 2014 at 2:10am
just add an abort input, that let's you stop reading further variables at anytime.

endless loop + if inside is a way to do that
Topic archived. No new replies allowed.