Search:

Type: Posts; User: ManicC

Search: Search took 0.01 seconds.

  1. Thread: swap funtion

    by ManicC
    Replies
    9
    Views
    1,728

    hmmmm...i'm really lost, i have no idea how to...

    hmmmm...i'm really lost, i have no idea how to sort this info using a bubble sort heres the complete code if anyone has any ideas, please let me know


    #include <stdio.h>

    struct cars{

    ...
  2. Thread: swap funtion

    by ManicC
    Replies
    9
    Views
    1,728

    sure struct cars{ char make[20]; ...

    sure

    struct cars{

    char make[20];
    char model[20];
    char color[20];
    int year;
    int price;
    }inven[50];
  3. Thread: swap funtion

    by ManicC
    Replies
    9
    Views
    1,728

    ok the problem is with the bubble sort itself...

    ok the problem is with the bubble sort itself
    this is what i have now

    void sort_make(struct cars *inven, int number){
    int i, j;
    for(j = number; j > number ; j--){

    for(i...
  4. Thread: swap funtion

    by ManicC
    Replies
    9
    Views
    1,728

    thanks, so what's the syntax for passing from the...

    thanks, so what's the syntax for passing from the bubble sort to the swap function? i just want to compare and sort a string element of a structure?
  5. Replies
    2
    Views
    920

    well lets say that you wanted to pass in 10...

    well lets say that you wanted to pass in 10 numbers entered by the user, you would have to work through the array using a for loop.

    example:

    void read_array(int *array) /*Reads in the...
  6. Thread: swap funtion

    by ManicC
    Replies
    9
    Views
    1,728

    swap funtion

    ok here's the problem i have this swap function that was created for a previous program, and i want to use it for a sort routine (bubble)

    struct students temp;

    ...
  7. Replies
    5
    Views
    2,503

    Hey thanks a lot C_Coder, i really wasn't...

    Hey thanks a lot C_Coder, i really wasn't expecting that much of a detailed reply. By the way yes, i'm sorting according to make, model, etc. using a bubble sort.
    again thanks

    --ManicC--
  8. Replies
    5
    Views
    2,503

    well see that's the problem is i have a lot of...

    well see that's the problem is i have a lot of code that wasn't even close to right. I'm not asking for anyone to give me code i just needed any ideas as to how i should go about doing this.

    this...
  9. Replies
    5
    Views
    2,503

    inventory program

    ok here's the deal i have to make a prog that ask the user how many cars that they want to enter, then prompt them for the make, model, year, color, price. Then sorts the info anyway the user wants...
Results 1 to 9 of 9