[Solved] C++ Storing constant varibale names within a vector [closed]

Simply use a new local variable inside your reading loop like this: while(stream >> token) { if(token == “#define”) { constantVariable addconstant; stream >> token; addconstant.constantName = token; stream >> token; addconstant.constantValue = token; constant.push_back(addconstant); } } But take care with checking the input stream. It should not be done as easy as you did … Read more

[Solved] find the input is alphanumeric or not with using #define macro preprocessor in c

Here is the macro: #define IS_ALNUM(x) (((x)>=’a’ && (x) <= ‘z’)) ||((x)>=’A’ && (x) <= ‘Z’)) || (((x)>=’0′ && (x) <= ‘9’))) It tests if it is Between a and z Between A and Z Between 0 and 9 Quite simple 2 solved find the input is alphanumeric or not with using #define macro preprocessor … Read more