Search:

Type: Posts; User: cpjust

Search: Search took 0.03 seconds.

  1. Replies
    12
    Views
    3,284

    What's wrong with it? It might be that you're...

    What's wrong with it?
    It might be that you're overflowing the buffer, since you're using strcat() which doesn't know the size of your string buffer.
  2. Replies
    12
    Views
    3,284

    In that case, you shouldn't use strcat() since...

    In that case, you shouldn't use strcat() since that appends a whole string instead of a single character.
    I haven't finished my coffee yet, but I believe this should work:

    size_t len = strlen(...
  3. Replies
    12
    Views
    3,284

    Are you trying to append a single character...

    Are you trying to append a single character there, or do you want the whole string beginning at position n?
  4. Replies
    12
    Views
    3,284

    strcat(str1,c[n]); You're passing a char here...

    strcat(str1,c[n]);
    You're passing a char here instead of a char*
Results 1 to 4 of 4