Base 10 to Base N conversion
using namespace std;



You may have already seen Why is “using namespace std;” considered bad practice?

Personally, I just find it easier and more readable to write out std:: where necessary.  

Declare where used


    int convertFromCopy, digit, convertTo;
    unsigned int convertFrom;
    string stringDigit, answer;



In old C, you used to have to define every variable at the beginning of a block.  In modern C and all C++, you can declare them anywhere.  

    int convertTo;
    unsigned int convertFrom;

    std::cout &lt;&lt; "Num (base 10): ";
    std::cin &gt;&gt; convertFrom;
    std::cout &lt;&lt; "Base: ";
    std::cin &gt;&gt; convertTo;

    std::string answer;
    int convertFromCopy = convertFrom;

    while (convertFrom != 0){
        int digit = convertFrom % convertTo;

        std::string stringDigit;
        if (digit &lt; 10) {
            stringDigit = '0' + digit;
        } else {
            stringDigit = digit - 10 + 'A';
        }

        answer = stringDigit + answer;

        convertFrom /= convertTo;                
    }

    std::cout &lt;&lt; convertFromCopy &lt;&lt; " written in base " &lt;&lt; convertTo &lt;&lt; " is: " &lt;&lt; answer;


I greatly prefer to use the block form for control statements (i.e. add {} to if and else here).  I find it both easier to read and less subject to editing errors.  

Abstract into functions

    int convertTo;
    unsigned int convertFrom;

    std::cout &lt;&lt; "Num (base 10): ";
    std::cin &gt;&gt; convertFrom;
    std::cout &lt;&lt; "Base: ";
    std::cin &gt;&gt; convertTo;

    std::string answer = convertFromBaseTo(convertFrom, convertTo);

    std::cout &lt;&lt; convertFrom &lt;&lt; " written in base " &lt;&lt; convertTo &lt;&lt; " is: " &lt;&lt; answer;


Note that the function removes the need for the convertFromCopy variable.  

std::string convertFromBaseTo(unsigned int convertFrom, int convertTo) {
    std::string answer;

    while (convertFrom != 0){
        int digit = convertFrom % convertTo;

        char stringDigit;
        if (digit &lt; 10) {
            stringDigit = '0' + digit;
        } else {
            stringDigit = digit - 10 + 'A';
        }

        answer.insert(answer.begin(), stringDigit);

        convertFrom /= convertTo;                
    }

    return answer;
}


I changed stringDigit to a char because it's just a single character.  Adding to answer changed a bit as well.