Category : C Source Code
Archive   : ANSICPP.ZIP
Filename : EX04001.CPP

 
Output of file : EX04001.CPP contained in archive : ANSICPP.ZIP
// ex04001.cpp
// Overloaded functions for different functionality
#include

void string_copy(char *dest, const char *src)
{
while((*dest++ = *src++) != '\0')
;
}

void string_copy(char *dest, const char *src, int len)
{
while (len && (*dest++ = *src++) != '\0')
--len;
while (len--)
*dest++ = '\0';
}

static char misspiggie[20], kermit[20];

main()
{
string_copy(misspiggie, "Miss Piggie");
string_copy(kermit,
"Kermit the file transfer protocol", 6);
cout << kermit << " and " << misspiggie;
}


  3 Responses to “Category : C Source Code
Archive   : ANSICPP.ZIP
Filename : EX04001.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/