Recognizing number representation (and convert to decimal) from the base prefixes
I see a number of things which may help you improve your code.

Be aware of what the standard doesn't say

Your use of unget() is not portable and will not work reliably.  The standard does not guarantee that an infinite number of characters will be buffered, and that's if the stream is buffered at all.  See this question for more details.

Use standard library functions where available

There is already a function std::stoi() which does the conversion you seek.  That is, it converts a std::string into an integer, applying the base conversions as specified.

Create functions to clarify your code

One thing that the code must do is to identify which base is specified by the source string.  Since what you need is a string identifying the base, such as "hexadecimal", given an input number as a string, we can write something simple like this:

const std::string&amp; baseid(const std::string&amp; str)
{
    static const std::string bases[]{
        "decimal", "octal", "hexadecimal"
    };
    enum baseid { DEC, OCT, HEX };
    if ((str.length() &lt; 2) || (str[0] != '0'))
        return bases[DEC];
    return str[1] == 'x' ? bases[HEX] : bases[OCT];
}


Don't abuse using namespace std

Putting using namespace std at the top of every program is a bad habit that you'd do well to avoid.  Know when to use it and when not to (as when writing include headers).  

Eliminate return 0 at the end of main

When a C++ program reaches the end of main the compiler will automatically generate code to return 0, so there is no reason to put return 0; explicitly at the end of main.

Don't wrap entire programs in a try clause

Rather than take the lazy way out and have a single massive block of code within the try clause, it's generally better to isolate specific things that might fail and deal with them individually and intelligently.  If you're not going to do anything useful with the output, it's probably better not to even have a try ... catch construct.

Use the appropriate #includes

This code uses a number of things that are in specific #include files but the code (as posted) does not show them.  Generally, reviewers have an easier time if you post an entire compilable program instead of just a non-compilable extract.

An alternative approach

Using the baseid function shown above, here's a much simpler program to accomplish this this:

numbase.cpp

#include &lt;iostream&gt;
#include &lt;string&gt; 
#include &lt;vector&gt;


const std::string&amp; baseid(const std::string&amp; str)
{
    static const std::string bases[]{
        "decimal", "octal", "hexadecimal"
    };
    enum baseid { DEC, OCT, HEX };
    if ((str.length() &lt; 2) || (str[0] != '0'))
        return bases[DEC];
    return str[1] == 'x' ? bases[HEX] : bases[OCT];
}

int main(){
    const std::string info ("This program recognizes multiple base prefixed numbers  dec:none, hex:0, oct:0x\nand converts them into decimals.\n");
    std::cout &lt;&lt; info;
    std::string num;
    std::vector&lt;std::string&gt; inputNumbers;

    while (std::cin &gt;&gt; num) 
        inputNumbers.push_back(num);
    for (const auto &amp;n : inputNumbers)
        std::cout &lt;&lt; n &lt;&lt; " " &lt;&lt; baseid(n) &lt;&lt;" converts to " 
                &lt;&lt; stoi(n,0,0) &lt;&lt;" decimal\n";  
}