Search:

Type: Posts; User: blueboyz

Search: Search took 0.00 seconds.

  1. Replies
    13
    Views
    5,724

    After I try to implement and understand it, this...

    After I try to implement and understand it, this method sort the value from linked list. Am I right?
    I don't need that. I need to compare the array of struct in my node. So in my node which contain...
  2. Replies
    13
    Views
    5,724

    So do you mean I need to change my whole code to...

    So do you mean I need to change my whole code to use head from my main? Not from global variables? or I just need to do on this function only?
  3. Replies
    13
    Views
    5,724

    Am I declaring this insertion sort function...

    Am I declaring this insertion sort function right?
    I am using source from wikipedia. But it doesn't show anything.


    kelas *SortList()
    {
    /* build up the sorted array from the empty list */
    ...
  4. Replies
    13
    Views
    5,724

    If I don't redeclare it, it will shows error and...

    If I don't redeclare it, it will shows error and I can't compile it. If I rename it, it will crash when I try to access that function. :S
  5. Replies
    13
    Views
    5,724

    What compiler do you use? I use codeblock which...

    What compiler do you use? I use codeblock which used gcc I think and DEV C++ it shows no error. If I don't redeclare it in my main my compiler didn't want to compile it.
  6. Replies
    13
    Views
    5,724

    yes. But actually I just need sorting array of...

    yes. But actually I just need sorting array of struct in 1 struct at 1 time. Not the entire linked list.
    I also tried to change it like this


    int sortByName(const void *a,const void *b)
    {
    ...
  7. Replies
    13
    Views
    5,724

    Sorting array of struct inside struct

    I don't know how to sort it? Can somebody help me. I am already trying qsort and bubble sort from google but I can't get it works. This is my full code

    #include <stdio.h>
    #include <stdlib.h>...
  8. Replies
    33
    Views
    21,663

    How I wanna sorting arra struct inside struct....

    How I wanna sorting arra struct inside struct. This is my code. I already changed struct student to array. kelas=node. I want to use qsort but I don't know what to do.

    #include <stdio.h>#include...
  9. Replies
    33
    Views
    21,663

    @claudiu kelas is my node and mhs is my list. I...

    @claudiu
    kelas is my node and mhs is my list. I point *next on my list is because I want to put 2 and more list in 1 node. Thats why I consider to change my list as array. I already making simple...
  10. Replies
    33
    Views
    21,663

    Well it works. But I got confused when trying to...

    Well it works. But I got confused when trying to print the node and the student. Basically I want to put some struct student to struct node. But I got realised now struct student and struct node is 2...
  11. Replies
    33
    Views
    21,663

    Now you know my case. What I mean is like struct...

    Now you know my case. What I mean is like struct node which is linked list with other node contain struct student which is linked list with another student.But now I know I can't limit struct...
  12. Replies
    33
    Views
    21,663

    OK I got it now. But what I need is putting 2 or...

    OK I got it now.
    But what I need is putting 2 or more linked list in 1 node. Maybe I need to change my code and use student as array
  13. Replies
    33
    Views
    21,663

    Can I used that method to store 2 or more student...

    Can I used that method to store 2 or more student in 1 node?
    With what? Array?
  14. Replies
    33
    Views
    21,663

    I still can't input anything if I don't use...

    I still can't input anything if I don't use fflush(stdin) before fgets(). Can you help me?

    Anyway, why in point 1 I can't cast malloc return? I need to know because my lecture usually declare...
  15. Replies
    33
    Views
    21,663

    This is my full code. Ignore the munu function...

    This is my full code. Ignore the munu function for now.


    #include <stdio.h>
    #include <stdlib.h>
    #include <conio.h>
    #include <string.h>


    typedef struct mhs mhs;
  16. Replies
    33
    Views
    21,663

    Can you explain it more detailed? I bit confused...

    Can you explain it more detailed? I bit confused with void *data. With an example of program maybe?

    Anyway I managed it somehow to passing data to student and node with allocate length of string....
  17. Replies
    33
    Views
    21,663

    I am already declare it like subsonics advice....

    I am already declare it like subsonics advice. Looks in
    mhs mhs

    Isn't that what subsonics advice? I use mhs mhs because I already typedef struct mhs to mhs
    So i called it as mhs mhs
  18. Replies
    33
    Views
    21,663

    Well I declare char as pointer in order to make...

    Well I declare char as pointer in order to make it accept no matter how many the length of the string. Can you help me how to accept any length of string?
    Anyway, this is my code. I hope you can fix...
  19. Replies
    33
    Views
    21,663

    I already tried it I changed ...

    I already tried it
    I changed


    strcpy(newNode->nama,*nama);
    strcpy(newNode->nim,*nim);



    to
  20. Replies
    33
    Views
    21,663

    Is this correct I declare it? typedef struct...

    Is this correct I declare it?


    typedef struct mhs mhs;
    typedef struct kelas kelas;


    struct mhs
    {
    char *nama;
  21. Replies
    33
    Views
    21,663

    Then how if I want to add new struct student? If...

    Then how if I want to add new struct student? If I declare it like that, doesn't it means for making new struct student I need to make new struct node right?
  22. Replies
    33
    Views
    21,663

    Declaring linked list inside linked list

    I got confused in my program. I want to make a struct class which is linked list and then inside it I want to have another struct called student. Can I declare struct student as a linked list too?...
Results 1 to 22 of 22