What is the point of #define in C++? I\'ve only seen examples where it\'s used in place of a \"magic number\" but I don\'t see the point in just giving that val
C didn't use to have consts, so #defines were the only way of providing constant values. Both C and C++ do have them now, so there is no point in using them, except when they are going to be tested with #ifdef/ifndef.