Is there an expression for ANY variable?

Hi, folks! I have a statistic program with several dozen variables and ten thousand iterations. The program returns a NaN in some loop every time. I want to tell the program to stop, if any possible variable turns NaN for the first time. I have _isnan() in mind. But it works only with a certain designated variable. So, is there an expression for ANY variable or a better way to solve this? Thanks in advance!
Nope. Either put all those variables in an array/vector and check them using a loop, or manually check each of them inside an if. There's no other way.
If the values are stored in a container or in an array you can use STL algorithms


http://www.cplusplus.com/reference/algorithm/find_if.html
thanks, guys!
Topic archived. No new replies allowed.