Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
alexchamberlain
· 14y ago · 0 comments
What's std::pair if it isn't a class?
Comments
[–]
ajross
14y ago
Surely alextgordon's point was that defining a solution in terms of a class where a function was more appropriate was bad, not that use of existing abstract types is to be avoided.
[–]
alextgordon
14y ago
There's nothing inherently wrong with classes. I use classes occasionally. But if you don't need to use one for
everything
. C++ isn't Java.
[–]
YogSothoth
14y ago
a struct ;-) ...
http://www.cplusplus.com/reference/std/utility/pair/
[–]
alexchamberlain
OP
14y ago
I was waiting for that! :-P