I know that this #define QUOTE(X) #X turns X into a c-string version of whatever is passed to it. my question is if there is a way to do this in reverse ie: #define DEQUOTEANDCALLFUNCTIONORCLASSWITHGIVENNAME(X) (X#)() is this possible?

This is a question that comes up from time to time on forums on C++. And, I'm convinced now that there is no way to do this. I hope I'm wrong, but I think there is little chance.

I feared as much :( time to write a function filled with string comparisons to each function I write... thanks anyways.

>>time to write a function filled with string comparisons to each function I write...

There is certainly a better solution than doing this. What are you trying to achieve?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.