Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. char* (tab)
  2. {
  3. int a;
  4. a=strlen(tab);
  5. char* nowa=new tab[a+3];
  6. char* pocz=nowa;  // wskaźnik na początek tego łańcucha, bo w whilezwiększamy wskaźnik i nie można go noralnie zwrocic
  7. while(*tab)     //alternatywa od tego while to strcpy(nowa, tab);
  8. {
  9. *nowa=*tab;  
  10. nowa++;        
  11. tab++;
  12. }
  13. For(int i=0; i<3; i++)
  14. {
  15. *nowa=!;
  16. nowa++;
  17. }
  18. Return pocz;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement