Hi I have a problem, I hope you can help me with.
I have a number, which I need to compare to some values.
I do not wish to go through all the values, and compare them individually, as I there are too many for it to be efficient.
Neither do I want to create an array with the size of the range of numbers, as it can anything from 0 UINT_MAX
So I am hoping that you might have a better solution.
Here is an example of what I have tried, but didn't work,
because I get the values dynamicly
class Mother
{
public:
Mother(){}
~Mother(){}
template<int msg> inline void HandleMessage(){};
template<> inline void HandleMessage<10>()
{
std::cout<<"It works!\n";
}
};