N
Neil Zanella
Hello,
I would like to ask how come the design of C++ includes
std:air. First of all I don't think many programmers
would use it. For starters, what the first and second
members are depends on what you are using the pair
for. For instance if I am using coordinates in two
dimensional space then I like to use x and y. So
I might as well define my own struct with x and
y members in it and create a constructor so
that I can easily instantiate pairs.
I wonder if there is a way to create a pair class
using std:air but typedef its first and second
to x and y using C++. The only way I can think
of is to subclass std:air<,>.
Suggestions and reccomendation on the best
practices and conventions for using std:air<,>
are most welcome.
Thanks,
Neil
I would like to ask how come the design of C++ includes
std:air. First of all I don't think many programmers
would use it. For starters, what the first and second
members are depends on what you are using the pair
for. For instance if I am using coordinates in two
dimensional space then I like to use x and y. So
I might as well define my own struct with x and
y members in it and create a constructor so
that I can easily instantiate pairs.
I wonder if there is a way to create a pair class
using std:air but typedef its first and second
to x and y using C++. The only way I can think
of is to subclass std:air<,>.
Suggestions and reccomendation on the best
practices and conventions for using std:air<,>
are most welcome.
Thanks,
Neil