Also your algorithm does not find prime numbers. In the code line
-
if(((prime % prime_nums[i]) != 0) && (prime != (2 || 3))
-
ignoring the prime != (2 || 3) error Ganon has already pointed out. prime % prime_nums[i]) != 0 does not test for prime numbers.
Take the case of testing 15 to see if it is prime, prime_nums[0] == 2 so on the first iteration this statement checks (15 % 2 != 0) this statement is true because 15 % 2 == 1 and that is not equal to 0 so 15 will be added to you list of prime numbers but 15 is not prime 15 = 3 * 5.
However worst than that having check 2 (and assuming that it had the list of prime numbers correct up to this point which is a false assumption) it will no on to check all the primes found so far, in this case 3, 5, 7 11 and 13. The result of 15 % these numbers is
15 % 3 = 0
15 % 5 = 0
15 % 7 = 1
15 % 11 = 4
15 % 13 = 2
It checks all of these and in all the cases of 15 % found_prime != 0 it adds 15 to the list, so not only is 15 not a prime number but it will be added to the list of prime numbers 4 times.
You have to complete the entire loop before taking the decision on the primeness of a number, you must check the number under test against all primes found so far (except see below) and only if they all return non-zero results is it prime if a single one of the results is 0 it is not prime.
Additionally you do not actually have to test all primes, you only have to test primes that at <= sqrt(value_under_test), once you have tested all primes then all primes between sqrt(value_under_test) < prime < value_under_test would be the result from a calculation already carried out during the first part of the test.
In you outer loop you start at 2, however you do not need to start at 2 because you already push 2 and 3 onto the vector of primes as known primes. So you can start at 4, however 4 is know not prime as in fact are all even numbers (except 2 but we already put that on the list) so you can start at 5 and instead of doing prime++ in the loop do prime += 2 automatically skipping all the even numbers and reducing the calculations required by 50%. Further than that since you are only checking odd numbers you do not have to check to see if they are divisible by 2 because no odd number is divisible by 2.
Finally you have still not put in any protection against the memory exception that will happen in the STL container when you run out of memory. vector is a bad choice because of its requirement to keep the memory in a contiguous block which means that when you add an entry it has to allocate a new block of vector_size + 1 and copy the data from the old block insert the new enty and release the old block. This means that at the point of copying the process is using twice as much heap as it actually requires to hold the list of primes causing it to stop much earlier. A list does not hold a contiguous block of memory, each entry is individually allocated so it works faster and doesn't stop as soon due to lack of memory as li never uses twice as much heap as required.
And double finally when you have got you algorithm working correctly do not except your program to run to completion. This algorithm works in exponential time, that is the time take to run is proportional to pow(e, largest_test_value). It will a very long time to run to completion. For this reason I also suggest that until you have a working algorithm you reduce the limit in the outer loop to something more sensible (say 1000).