CopyPaste

Pastebin by Anonymous 06.02.2010 21:31:43
Download | PermaLink | New

  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. void mystrcpy(char *Dest, char *Source);
  6.  
  7. int main()
  8. {
  9.         char str[20] = "This is a string";
  10.         char str2[20];
  11.  
  12.         mystrcpy(str2, str);
  13.  
  14.         cout << str2 << endl;
  15.        
  16.  
  17. cout << "\n\n";
  18. system("pause");
  19. return 0;
  20.  
  21.  
  22. }
  23.  
  24. void mystrcpy(char *Dest, char *Source)
  25. {
  26.         int i;
  27.         for (i=0;Source[i];i++) Dest[i]=Source[i];
  28.        
  29. }


Pastebin bearbeiten

Note: your pastebin is public viewable! Do not post passwords, etc.
Syntax highlighting


Code



Description (optional)


CAPTCHA Code
Please enter this captcha code CAPTCHA here (Reload Captcha)


Aktuelle Posts/Archiv
Post anzeigen Post nicht anzeigen (Permalink merken!)

Name
remember name