Testing two macros for equality

How would I test two macros for equality? For example:
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <another_file.h>
#define REQUIRED_VERSION "0.7.41"   // version required for a_newly_implemented_function() in A_class_from_another_file to work

// ...
A_class_from_another_file a;

#if REQUIRED_VERSION == ACTUAL_VERSION_DEFINED_IN_ANOTHER_FILE     // how would I get something like this to work?
std::cout << a.a_newly_implemented_function() << std::endl;
#else
// alternative
#endif

// ... 


When I try that, I get something like this (g++):
error: token ""0.7.41"" is not valid in preprocessor expressions
Last edited on
Just what the error says. You can't use strings in preprocessor expressions.
You could do this, though:
#define REQUIRED_VERSION 0741
OK, I'll try that.
Topic archived. No new replies allowed.