Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/24/04 09:16
Read: times


 
#81811 - additional info: source code
Responding to: ???'s previous message
string.h

extern char* strcpy ( char *pStr1, char *pStr2 );



string.c

char*  strcpy ( char *pStr1, char *pStr2 )
{
  int i;
  char *p = pStr1;

  /* Copy all characters */
  for ( i = 0; *pStr2 != 0; i++ )
    *pStr1++ = *pStr2++;

  /* Add '/0' at the end of string */
  *pStr1 = 0;

  return p;
} /* end of strcpy() function */



main.c

#include "string.h"

char    buf[255]="first";
char    buf2[255]="second";
void main ( void )
{
    while(1)
    {
        strcpy(buf,buf2);
    } // end of while
} // end of main





List of 16 messages in thread
TopicAuthorDate
strcpy - inrinsic?            01/01/70 00:00      
   C231            01/01/70 00:00      
      c231            01/01/70 00:00      
   Maybe not strcpy?            01/01/70 00:00      
      strcpy            01/01/70 00:00      
   Finding Keil error descriptions            01/01/70 00:00      
   odd            01/01/70 00:00      
      additional info: source code            01/01/70 00:00      
         additional info            01/01/70 00:00      
            Your code            01/01/70 00:00      
               Thanks            01/01/70 00:00      
         Inefficient!            01/01/70 00:00      
            Inefficient!            01/01/70 00:00      
   One thing to note            01/01/70 00:00      
   I just can't resist it            01/01/70 00:00      
      One common reason why.            01/01/70 00:00      

Back to Subject List