Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: elephant7

Search: Search took 0.00 seconds.

  1. Re: Sorting with selection, insertion, and bubble sort

    Okay I think I got it to work, if you wouldn't mind checking over the insertion sort function:

    #include <iostream>
    #include <fstream>
    #include <string>
    using namespace std;

    const string...
  2. Re: Sorting with selection, insertion, and bubble sort

    The selection and bubble sorts are working with this code below, but I couldn't figure out how to change the insertion sort to work properly. I tried making int current to Population current, but it...
  3. Re: Sorting with selection, insertion, and bubble sort

    Okay thank you, but it is still looping for some reason:


    #include <iostream>
    #include <fstream>
    #include <string>
    using namespace std;

    const string filename = "population.csv";
    const int...
  4. Re: Sorting with selection, insertion, and bubble sort

    So I tried this:

    minvalue = data[startscan].pop;
    data[startscan] = data[minindex];
    data[minindex].pop = minvalue;

    and it's still not working
  5. Re: Sorting with selection, insertion, and bubble sort

    a=a+b;
    b=a-b;
    a=a-b;

    or


    temp = a;
    a = b;
    b = temp;
  6. Re: Sorting with selection, insertion, and bubble sort

    I can't figure out what the problem is, I tried using the debugger and didn't have any luck.
  7. Re: Sorting with selection, insertion, and bubble sort

    I tried that and now it says : "warning C4244: '=' : conversion from 'double' to 'int', possible loss of data"

    So I changed :
    double rank,
    pop;
    to:
    int rank,
    pop;

    Now it runs, but...
  8. Re: Sorting with selection, insertion, and bubble sort

    The code still isn't working. It now says: "error C2440: '=' : cannot convert from 'Population' to 'int' " on this line: "minvalue = data[startscan];"




    #include <iostream>
    #include <fstream>...
  9. Re: Sorting with selection, insertion, and bubble sort

    Thank you for your help. I haven't used vectors very much, is there another way of doing that part?

    Here is my revised code:
    (I'm still having issues, it says that there is a mismatch in formal...
  10. Re: Sorting with selection, insertion, and bubble sort

    Thank you for your help. This assignment is past due, but I am just trying to understand it for future assignments. I updated my code with your advice, but am unsure how to do the array part.

    Here...
  11. Sorting with selection, insertion, and bubble sort

    I need some help with this program using the selection, insertion, and bubble sorts. The program needs to be able to do the following:

    1. Create an array of 1000 population records when the array...
  12. Replies
    10
    Views
    677

    Re: Hash Table Problems

    No, I'm not sure what order to place each line to make it work properly. I've tried moving it around and have had no luck.

    Thank you
  13. Replies
    10
    Views
    677

    Re: Hash Table Problems

    I removed the replication of the lines that read from the file and kept them within the while loop and I'm still not getting the correct output. Here are the changes I made.


    void...
  14. Replies
    10
    Views
    677

    Re: Hash Table Problems

    I was able to get some of it working properly but still need help in some spots, which I've marked with comments.
    If you could look over it and let me know if I'm on the right track, that would be...
  15. Replies
    10
    Views
    677

    Re: Hash Table Problems

    I'm not even sure where these cout statements should go or if I have them in the correct spot..

    cout << " is being added" << endl;
    cout << "The hashed location is " << hashFunc(movie) << endl;
    ...
  16. Replies
    10
    Views
    677

    Re: Hash Table Problems

    the program runs but the output is all jumbled up and not displaying in the correct format that the teacher required.

    This is what my output looks like if: ( I know I don't have it coded correctly...
  17. Replies
    10
    Views
    677

    Hash Table Problems

    I'm hoping to get some help with a few things for this homework assignment. I have included the assignment requirements below along with the my code so far. I am having trouble getting the cout...
Results 1 to 17 of 17


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center