Here is the code snippet:
#include <iostream>
int main()
{
std::cout << std::hex << 123 << std::endl;
std::cout << &std::hex << 123 << std::endl;
}
What's
&std::hex
? I think it acquire the address ofstd::hex
. And the address would be printed out.Is there any potential problem with this code snippet because somebody said it's bad to acquire the address of a function provided by the standard library?