Search:

Type: Posts; User: c99tutorial

Search: Search took 0.02 seconds.

  1. Replies
    6
    Views
    2,411

    UPDATE: There is a typo in the above, it should...

    UPDATE: There is a typo in the above, it should be



    void delete_elem(char *arr, size_t n, char *s) {
    memmove(s, s+1, n-(s-arr)-1);
    }
  2. Replies
    6
    Views
    2,411

    This is what "memmove" and strchr, and strrchr...

    This is what "memmove" and strchr, and strrchr are for. strchr and strrchr return a pointer to where a certain character is. So define a delete_elem function to take a pointer argument like this

    ...
Results 1 to 2 of 2