Advertisement
Alberts00

dinchar

Jan 6th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. void iznemejs(char* smas, char* &bezcip){
  6. int skait=0;
  7. for (int i=0; i<strlen(smas)+1;i++){
  8.  
  9. if (smas[i]< '0' || smas[i] > '9') {
  10. bezcip[skait]=smas[i];
  11. skait++;}
  12. }
  13. }
  14.  
  15. int main()
  16. {
  17.  
  18. char* a="6666a";
  19. char* b = new char[strlen(a) + 1];
  20. iznemejs(a,b);
  21. cout << a << endl;
  22. cout << b;
  23. //cout << b;
  24.  
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement