User Profile

Collapse

Profile Sidebar

Collapse
boba
boba
Last Activity: Feb 8 '10, 06:16 PM
Joined: Feb 4 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • boba
    replied to strcpy and strncpy
    in C
    thanks for the tip...
    See more | Go to post

    Leave a comment:


  • boba
    replied to strcpy and strncpy
    in C
    thx a lot Donbock, I really appreciate it
    See more | Go to post

    Leave a comment:


  • boba
    replied to strcpy and strncpy
    in C
    thx donbock for the quick reply.

    What if I am not sure what my destination and/or source buffer length is?

    also you said that "If the source string is longer than the destination buffer then strncpy won't null-terminate the destination string. You must not treat the destination buffer as a string until after it is null-terminated"

    So in that case what will happen if it does not null-terminate my string?...
    See more | Go to post

    Leave a comment:


  • boba
    started a topic strcpy and strncpy
    in C

    strcpy and strncpy

    Hi,

    I am a newbie to C++ (and programming in general)

    I have the following:

    char* fOutMsg;
    strcpy(fOutMsg, "03DS2");
    --------------------------------------------------------------
    in another place:

    char fPpn[32] = {0};
    strcpy(fPpn, " ");

    -------------------------------------------------------------------...
    See more | Go to post
No activity results to display
Show More
Working...