Search:

Type: Posts; User: stefanyco

Search: Search took 0.00 seconds.

  1. Well what would be causing me to get a bad_alloc...

    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...
  2. The data file contains a series of random numbers...

    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...
  3. I'll reply to myself. I ALSO tried: do {...

    I'll reply to myself. I ALSO tried:



    do {
    cin >> number;
    list.push_back(number);
    } while (number);
  4. Problem inputting numbers into vector from file

    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;
    ...
Results 1 to 4 of 4