mmm...
so i decide to use different function..
one whith x and y and one y and z whith the same name..
the class permit it , so itn't wrong!..
anyone have another idea?..
@laserlight : good idea!!..but is a litle bit hard..
thanks to all!!..
Printable View
mmm...
so i decide to use different function..
one whith x and y and one y and z whith the same name..
the class permit it , so itn't wrong!..
anyone have another idea?..
@laserlight : good idea!!..but is a litle bit hard..
thanks to all!!..
Hmm... std::vector<std::pair<char, T> > would have been easier too look at. But I think it's not worth the effort. This makes the calling code and the implementation (and not just the interface/prototype) too strongly coupled. Not worth it, no. The OP must accept the fact that what he wants does not make sense in C++ (and many other lnaguages as well). He just have to have default arguments in the order as it is supposed to be or pass the default argument values while making the call or have overloads if they can be implemented (needs default arguments to be of different types else overloading doesnt work either).Quote:
Originally Posted by laserlight
Otherwise, have some kind of a message format (XML or any other) if this too complicated layer of interaction and add logic to build and decode what the message holds (analogous to the map solution but more generic across application layers). But I don't think this is what he wants.