That's a lot of wasted space in that lookup table. Perhaps a std::map would be more appropriate?
Or you could find a perfect hash for the available operators. That would be fastest.
But we're no longer really helping the OP.
That's a lot of wasted space in that lookup table. Perhaps a std::map would be more appropriate?
Or you could find a perfect hash for the available operators. That would be fastest.
But we're no longer really helping the OP.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
Maybe, but I haven't done it with any other methods than a pure lookup table based by value.
That is, if I can find a good hashing method, because I don't know one.
Ah... does it matter? We could hijack the thread for interesting discussions on doing this
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law