Search:

Type: Posts; User: BoneXXX

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: strlen()

    by BoneXXX
    Replies
    6
    Views
    2,127

    thanks dude. This website has a good example who...

    thanks dude. This website has a good example who wants to learn about it, should check it: Link
  2. Thread: strlen()

    by BoneXXX
    Replies
    6
    Views
    2,127

    thanks, do you know what could I use to get first...

    thanks, do you know what could I use to get first 3 characters of a string?
  3. Thread: strlen()

    by BoneXXX
    Replies
    6
    Views
    2,127

    strlen()

    Could you give me a example code to get first 3 letters of a string by using strlen().Thanks.

    Such as like this, no details just a small example.


    int strlen ( char * string ) ;

    printf...
  4. Replies
    4
    Views
    1,631

    Thanks for the replies. I will try to give more...

    Thanks for the replies. I will try to give more information about the question that I am going to solve. The user will specify the number of vertices. For example: 7.

    In the numerical order of...
  5. Replies
    4
    Views
    1,631

    Need advise on adjency list

    Hi all,

    I need some advise about the program that I am going to write. I'll try to explain it briefly. There is going to be an array, such as ;

    [ 0 1 2 3 4 5 6]

    and each array element going...
  6. Replies
    15
    Views
    14,042

    I put some printf statements around ...

    I put some printf statements around



    printf("Enter an unit name but not more than 100 characters:\n");
    scanf("%s",buffer);
    n=(char*)malloc(strlen(buffer)+1);
    strcpy(n,buffer);
    printf("n:%s...
  7. Replies
    15
    Views
    14,042

    Thanks for the reply but in your codes nothing...

    Thanks for the reply but in your codes nothing goes into the function. In my codes everything is fine until "delete_it(n,the_list);", when it comes to this point I get a segmentation fault.
  8. Replies
    15
    Views
    14,042

    It is fixed. I have another question now. When I...

    It is fixed. I have another question now. When I want to delete a name from the list I get a segmentation fault. At least could you help me on this?

    calling the function:


    printf("Enter an...
  9. Replies
    15
    Views
    14,042

    it didn't work:( Can it be related to my main...

    it didn't work:( Can it be related to my main program.


    printf("Enter a name:\n");
    scanf("%s",buffer);
    n=(char*)malloc(strlen(buffer));
    strcpy(n,buffer);
    delete_it(n,the_list);
  10. Replies
    15
    Views
    14,042

    I tried it with && (strcmp(before->next->name,...

    I tried it with && (strcmp(before->next->name, new_node->name) == 0) but I will try your suggestion and let you know. Thanks.
  11. Replies
    15
    Views
    14,042

    I sorted out now, it compiles in the right...

    I sorted out now, it compiles in the right alphabetic order but it can take the same input more than once. Is there any idea?



    void insert_in_order(char *n, node_ptr list)
    {
    node_ptr...
  12. Replies
    15
    Views
    14,042

    but whit the while loop I wanted to compare the...

    but whit the while loop I wanted to compare the previous and the current nodes find the right place. Such as 1 2 4 5 - 3 is going to be inserted between 2 and 4. I was trying to do this.
  13. Replies
    15
    Views
    14,042

    Thanks for the reply. The compiling problem is...

    Thanks for the reply. The compiling problem is fixed.

    Unfortunately it didn't sorted in the way that I wanted which is in an alphabetic way.

    My input was : a b z c
    the output : c z b a
  14. Replies
    15
    Views
    14,042

    Thanks for the replies.At this point I need bit...

    Thanks for the replies.At this point I need bit more effective. Am I on the right right track, if I am not can you put me on the right track?

    I am getting


    list.c:59: warning: passing arg 2...
  15. Replies
    15
    Views
    14,042

    Sorting a string linked list

    I want to print out a sorted string linked list but my codes sort in the order of entry.
    such as :


    Input : e a g c
    Outout : e a g c


    How can I convert my codes to insert the inputs in...
  16. Replies
    2
    Views
    12,978

    Thanks a lot, it is a simple thing but when you...

    Thanks a lot, it is a simple thing but when you don't have much experience, it is a complex problem. I was trying to figure out for hours. I appreciate it, it compiles fine now.
  17. Replies
    2
    Views
    12,978

    implicit declaration of function?

    warning: implicit declaration of function `malloc'
    warning: implicit declaration of function `strlen'
    warning: implicit declaration of function `strcpy'


    I am getting these messages when I...
  18. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    Just for an exercise. it can be 10. ...

    Just for an exercise. it can be 10.



    #ifndef _1_H
    #define _1_H

    struct car
    {
    int car_km;
  19. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    I don't know how to get int car_km, char...

    I don't know how to get int car_km, char *car_color from struct car?


    printf("%s", current->car_brand);
    printf("%d", current->numberOfcars);
    printf("%d", ?????); /* car km*/...
  20. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    Okay, I have one more question; did that code...

    Okay, I have one more question; did that code create me this node?Thanks

    Node
    Car Brand
    Number of cars which are the same brand
    car km,color
    Null
  21. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    Could you check my work, please? I wanted to...

    Could you check my work, please? I wanted to create an empty list, is this right?

    This is the header stuff:


    #ifndef _1_H
    #define _1_H

    struct car
    {
  22. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    Do you have any good example program? I don't...

    Do you have any good example program? I don't have any experience with 2D arrays.
  23. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    Thanks for the reply....

    Thanks for the reply.
    http://cboard.cprogramming.com/showthread.php?t=22444&highlight=multilist
  24. Thread: Multilist

    by BoneXXX
    Replies
    13
    Views
    5,213

    Multilist

    I am looking for a multilist tutorial. Does any one know a good multilist tutorial? Thanks in advance.
  25. Replies
    20
    Views
    13,814

    Thanks for the replies.

    Thanks for the replies.
Results 1 to 25 of 62
Page 1 of 3 1 2 3