Quote:
Going on from this, is there a definitive (and easily understood!) list of which header is required for which function in C++? Logic would have pointed me towards a mathematical header if I'd needed abs() as it is a mathematical function. I wouldn't have had a clue that cstdlib even existed.
This is a strong and valid question. And I know exactly how you feel. My first experience with C++ went down in my history books as a short period of my life where I trully felt what was to live in the middle of chaos. But, as they say there's order in chaos. And definitely there's order on the standard headers. They are just too many, and for newcommers like you and me, the C++ Standard Library the Standard Template Library and all those names for headers files makes our exposure to C++ anything but a peaceful experience.