Your question is based on a false premise; on a misconception.
Addresses aren't hex, or decimal, or octal, or binary, or anything else.
You do not have "the hex address", or "the octal representation for the same", ever.
Addresses are addresses.
Even if they were the same thing conceptually as numbers, they still wouldn't be hex, or decimal, or octal, or binary, or anything else, because those are bases used when representing numbers, i.e. printing them to screen. They are not a property of the number; they are not a part of its value, nor of its type.
Numbers are numbers.
With that out of the way, what you need to do is get a number from an address, then print that number in your desired representation.
The first one's easy: cast it to std::uintptr_t in C++11 (or just uintptr_t in C99). You don't need to use reinterpret_cast for that; you could use a C-style cast instead. But you do need to cast. Then output it however you like, just as you would output any other number, in whatever base you like.
Ironically, that's probably why you think these things are "hex" or "octal", because the only way you can ever see them on screen is when somebody has done these steps for you.