title: How to determine which include header file a function comes from?
body: <p>When learning new functions, I like to include the full name when calling them (e.g., <code>std::cin</code> instead of <code>cin</code>). Is there a similar way to include the header that the function came from? E.g., is there a way to specify the sort function is from the <code>&lt;algorithm&gt;</code> header, and not the <code>&lt;iomanip&gt;</code> header, or whatever?</p>
  
  <p>For instance, it would be cool if I could call <code>sort</code> using something like <code>std::algorithm::sort</code> instead of <code>std::sort</code>. There are so many headers built in to the standard library that just using <code>std::*</code> is not actually that informative, and tells me very little specifically about where <code>*</code> is coming from. </p>
  
  <p>Obviously as I get better with C++ this might not be necessary, but my goal is to learn which functions go with which headers to better learn the standard library.</p>
  
  <p>If there is no such way to specify the function, is there a function I can use to determine which header supplied the function?</p>
  
  <p>Ultimately I think it will be good coding practice to list the functions you will be using that are associated with each header:</p>
  
  <pre><code>#include &lt;iostream&gt;  //std::cout, std::cin
  </code></pre>
  
  <p>That way people can figure out what comes from where! Why is this not done more, given c++ community's admirable obsession with clarity about names?</p>
  
  <p>Note: This question is only possible because C++ is a very non-Pythonic language. "Explicit is better than implicit" after all. :) </p>