2014-05-01, 03:56 PM
Okay thanks! I have a question on reading in the data from the fileĀ
as you can see from above, Option A and Option B both have two floodlights with given measurements. But Option C has three floodlights all with random values. how should I read the measurements in? Right now i have
But as soon as it loops around for the last option, C, my data reading in will get messed up..
could i do this?:
then do all the calculations and stuff in there then do a separate while loop for option C, like:
Code:
lights >> option >> num_floodlights >> given_or_random >> measurement_1 >> measurement_2 >> measurement_3 >> measurement_4 >> power >> height;But as soon as it loops around for the last option, C, my data reading in will get messed up..
could i do this?:
Code:
while(option !=C)
lights >> option >> num_floodlights >> given_or_random >> measurement_1 >> measurement_2 >> measurement_3 >> measurement_4 >> power >> height;then do all the calculations and stuff in there then do a separate while loop for option C, like:
Code:
while(option=C)
lights >> option >> num_floodlights >> given_or_random >> power >> height;
