Returns all primes p between m <= p <= n
Here are a few things that may help you improve your program.

Improve your algorithm

Right now, within the isPrime routine, the loop begins at 2 and does a test division of every number from \$2\$ to \$\sqrt{n}\$.  However, we already know that other than 2, all prime numbers are odd.  You can approximately double the speed of this algorithm by writing it like this instead:

bool isPrime(int n) {
    if (n == 1) return false;
    if (n == 2) return true; 
    if (n % 2) return false;
    int root = int(ceil(sqrt(n))); 
    for (int i = 3; i &lt;= root; i+=2){
        if (n % i == 0) return false; 
    }
    return true;
}


Prefer for to while where appropriate

The input section of the code has these lines:

int tempA = 0;
while (tempA &lt; 2*lines) {
    cin &gt;&gt; toPush;
    inputs.push_back(toPush);
    ++tempA;
}


It seems to me that this would be more clear as a for loop:

for(int tempA = 2*lines; tempA; --tempA) {
    std::cin &gt;&gt; toPush;
    inputs.push_back(toPush);
}


The same is true for the main loop in the program.  It could be written this way:

for (auto i = inputs.begin(); i != inputs.end(); ++i) {
    for (int m = *i++, n=*i; m &lt;= n; ++m) {
        if (isPrime(m)){
            std::cout &lt;&lt; m &lt;&lt; " ";
        }
    }
    std::cout &lt;&lt; '\n';
}


Store std::pairs instead of ints

After the first number, the program's input consists of pairs.  It might make more sense to store them in a std::vector&lt;std::pair&lt;int, int&gt;&gt;

The input routine would then look like this:

for(int tempA = 2*lines; tempA; --tempA) {
    std::pair&lt;int, int&gt; toPush;
    std::cin &gt;&gt; toPush.first &gt;&gt; toPush.second;
    inputs.push_back(toPush);
}


The main loop is then considerably simplified by the use of the pair and a "range-for" outer loop:

for (const auto &amp;lim : inputs) {
    for (int m = lim.first; m &lt;= lim.second; ++m) {
        if (isPrime(m)){
            std::cout &lt;&lt; m &lt;&lt; " ";
        }
    }
    std::cout &lt;&lt; '\n';
}


}

Use a better algorithm

The code works as it is, but could be still further improved.  Since the inputs are all read at the beginning, you could choose the largest upper bound and run a sieve of Eratosthenes to derive all primes up to that number.  Then printing for any range would be simply a matter of lookup.