Search:

Type: Posts; User: Chanakya

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    8,025

    It is working fine. I was required to use...

    It is working fine.
    I was required to use selection sort. However I was wondering if the number of loop executions, the number of if statements or the number of pointers used could be reduced.
  2. Replies
    4
    Views
    5,471

    pass the parameters as a refrence. void...

    pass the parameters as a refrence.
    void unitconversion (double &lengthme, double &lengthcent);
    remove the return statement in unitconversion
    don't cout<<unitoutput(lengthme, lengthcent);
    ...
  3. Replies
    4
    Views
    5,471

    Errors: 1. You haven't called the unitconversion...

    Errors:
    1. You haven't called the unitconversion function.
    2. A function can return only one value at time, you might pass the parameters as a reference.
    3. don't cout<<unitoutput(lengthme,...
  4. Replies
    5
    Views
    8,025

    Selection Sort Link List

    Help me make this code more efficient.


    void llist::sort()
    {
    int val,val1;
    for(node *p = first, *p1, *pos; p->next != NULL; p = p->next)
    {
    val = p->info;
    pos = p;
  5. Replies
    7
    Views
    35,614

    I have made the above changes but segmentation...

    I have made the above changes but segmentation fault still persists.



    #include <fstream>
    #include <iostream>


    using namespace std;
  6. Replies
    7
    Views
    35,614

    Segmentation fault 11

    I am trying merge sort an array of 5 numbers. g++ compiles the program without error but i am unable to execute due to segmentation fault 11. I have read the article on segmentation faults. I think...
Results 1 to 6 of 6