Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* (tab)
- {
- int a;
- a=strlen(tab);
- char* nowa=new tab[a+3];
- char* pocz=nowa; // wskaźnik na początek tego łańcucha, bo w whilezwiększamy wskaźnik i nie można go noralnie zwrocic
- while(*tab) //alternatywa od tego while to strcpy(nowa, tab);
- {
- *nowa=*tab;
- nowa++;
- tab++;
- }
- For(int i=0; i<3; i++)
- {
- *nowa=’!’;
- nowa++;
- }
- Return pocz;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement