Friday, August 12, 2011

C++ Help on flightpath order??

Been awhile since I've touched C++, but this should be a pretty easy function. Just set up a "for" loop that goes from 0 to num_pts-1, and set up two local variables (outside of the for loop), let's say m and n. Now, for the first iteration of the loop, set m to -4 and n to -0.182 (the first two data points). For the next iteration, check that the next data points are greater than m and n. If they are, continue. If they're not, break out of the for loop and return 0. If you can get to the end of the for loop without breaking, then return 1.

No comments:

Post a Comment