4 ms·
What's std::pair if it isn't a class?
by alexchamberlain 15y ago
What's std::pair if it isn't a class?
- alextgordon 15y agoThere'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.
- ajross 15y agoSurely 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.
- YogSothoth 15y agoa struct ;-) ... http://www.cplusplus.com/reference/std/utility/pair/ http://www.cplusplus.com/reference/std/utility/pair/
- alexchamberlain 15y agoI was waiting for that! :-P