How to represent infinity?

Here i want to test the Prim algorithm with Adjacent Matrix, but i don't know how to represent infinity with c++ ,is there a header with #define directive? Please help me. Thanks!
numeric_limits<double>/*or float*/::infinity()
http://www.cplusplus.com/reference/std/limits/numeric_limits/
Topic archived. No new replies allowed.