Well what would be causing me to get a bad_alloc error? And/or CPU time limit exceeded?
I add print statements after everything and the error seems to be only with adding ints to the vector with...
Type: Posts; User: stefanyco
Well what would be causing me to get a bad_alloc error? And/or CPU time limit exceeded?
I add print statements after everything and the error seems to be only with adding ints to the vector with...
The data file contains a series of random numbers using a different program that writes to a data.txt file.
I use srand(time(0)); cout << rand();
So the file looks like this:
1485738376...
I'll reply to myself. I ALSO tried:
do {
cin >> number;
list.push_back(number);
} while (number);
Hello! so, I'm implementing quicksort and selection sort using vectors.
I have the following code. To run I use redirection. i.e. ./program.out <datafile
int main()
{
int number;
...