Checking not a number value

Hi
I have a variable X, this variable sometimes returns not a number (nan).
I want to check this variable if it is not number (nan) or a number. Also, I want to make this variable equal to zero if it is not a number (nan). Anyone can help me plz..
Regards

Please post a code fragment. What type of variable is x supposed to be?
(cross-posted and answered here) http://www.cplusplus.com/forum/beginner/203130/
Topic archived. No new replies allowed.