Search:

Type: Posts; User: Amulon; Keyword(s):

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,218

    Re: Creating a graph in C++

    So would I not create this at the start? Because the user has to enter in which airport they want to start the flight. Then the rest of the information will be displayed about all possible routes and...
  2. Replies
    6
    Views
    1,218

    Re: Creating a graph in C++

    Thread reopened! Okay, so i've done something like this


    struct flight
    {
    string startAirport;
    string endAirport;
    int milege;
    int cost;
  3. Replies
    6
    Views
    1,218

    Re: Creating a graph in C++

    Awesome! Thanks guys for your input. It shed some more light on this program and its helped me get closer to finishing. Thanks again!
  4. Replies
    6
    Views
    1,218

    Creating a graph in C++

    So I have been trying to find a good place to learn how to implement a graph, but I have been unable to find one.

    I have to create a program that reads in the data about airports and the airports...
  5. Replies
    8
    Views
    624

    Re: C++ Making code work for a vector

    Maybe. Hah. Thanks for the help on pointing that out.
  6. Replies
    8
    Views
    624

    Re: C++ Making code work for a vector

    That is true there is a partition function... All the code I provided is the code that the professor gave us. So partition isn't previously implemented. Hmmmm. I'll have to ask him about that. Or...
  7. Replies
    8
    Views
    624

    Re: C++ Making code work for a vector

    Well there is more to the project then just the quicksort. There have been other sorts that I have done. But those ones have been easy to make work with the vectors I've implemented. This is just the...
  8. Replies
    8
    Views
    624

    C++ Making code work for a vector

    //Quicksort
    template <class Record>
    void Sortable_list<Record>::quick_sort()
    {
    recursive_quick_sort(0, count - 1)
    }


    template <class Record>
    void...
  9. Replies
    5
    Views
    392

    Re: Reading in a file in C++

    Yeah, all of the variables have been previously declared. Do you want me to provide that too?
  10. Replies
    5
    Views
    392

    Reading in a file in C++

    Here is the code to do sorting by insertion. I am getting an 'out of range error'. How do I better read in the text file and store it in the Vector without running into this problem?

    Thanks in...
  11. Re: Converting a single linked list to a double linked list

    Oh sorry, I forgot to put that. C++. Like... I know the concept of how to do it. I just can't make it work. It is something like this, right?

    p->next = q->next;
    p->back = q;
    q->next->back = p;...
  12. Converting a single linked list to a double linked list

    I have created a single linked list that has integers from a file. How do I copy the nodes in the single linked list to a double linked list?

    Thanks!
  13. Replies
    10
    Views
    611

    Re: Reading in a file in C++

    Man, stop complaining.
  14. Replies
    10
    Views
    611

    Re: Reading in a file in C++

    Uh... ? Why would I say that thanks for using my own insights? Of course I mean't the people who helped me.

    I am not mad/frustrated in the slightest about what people have replied. I am not saying...
  15. Replies
    10
    Views
    611

    Re: Reading in a file in C++

    So I have used your insights to pretty much finish the project. Everything is good until 1 spot. The file is like:

    push 10
    push 10
    push 10
    push 10
    pop
    push 2
    push 2
    push 2
  16. Replies
    10
    Views
    611

    Re: Reading in a file in C++

    So you are saying that with each line of file that I read I should do a line of code like:


    data >> stringVariable >> intVariable
  17. Replies
    10
    Views
    611

    Reading in a file in C++

    I am trying to read in a file that is similar to this:

    push 10
    pop
    push 20
    push 30
    pop
    push 10
    push 50
    push 20
Results 1 to 17 of 17