Forgot parameters for Strcpy()

This is a discussion on Forgot parameters for Strcpy() within the C++ Programming forums, part of the General Programming Boards category; Easy one for ya lads whats the parameters for the Strcpy()? Example too, I'm useless decoding pseudo... Thanks!...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    3

    Wink Forgot parameters for Strcpy()

    Easy one for ya lads whats the parameters for the Strcpy()?

    Example too, I'm useless decoding pseudo... Thanks!

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Prototype strcpy(char *, char *) so...

    char string[255];
    strcpy(string,"abcd");

    ... string now has abcd in it with a NULL terminator.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    53
    >>Prototype strcpy(char *, char *) so...

    Watch it though... this one always catches me out. It's actually a const char * for the second parameter... it makes a difference if you want to use a char* instead of a char[]....

    Almosthere
    "Technology has merely provided us with a more efficient means for going backwards" - Aldous Huxley

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Behold! Never forget the parameters to a standard function again!
    http://www.rt.com/man/
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Parameters quick Question
    By lifeis2evil in forum C++ Programming
    Replies: 2
    Last Post: 11-18-2007, 11:12 PM
  2. function with variable number of parameters
    By mikahell in forum C++ Programming
    Replies: 3
    Last Post: 07-23-2006, 04:35 PM
  3. Additional parameters for operator delete
    By darksaidin in forum C++ Programming
    Replies: 0
    Last Post: 09-21-2003, 12:46 PM
  4. Passing parameters from VB to C++ through ActiveX DLL
    By torbjorn in forum Windows Programming
    Replies: 0
    Last Post: 12-10-2002, 03:13 AM
  5. command-line parameters.
    By Tombear in forum C Programming
    Replies: 2
    Last Post: 10-28-2001, 08:40 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21