Guest User

Untitled

a guest
Sep 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include <conio.h>
  4. #include <stdio.h>
  5. #include <regex>
  6.  
  7. string Sortstr (str[mlength]);
  8. sort(Sortstr.begin(), Sortstr.end());
  9.  
  10. int mlength = 100;
  11. int main()
  12. {
  13.  
  14. char str[mlength];
  15. int length;
  16.  
  17. cout << "Please enter a c-string: ";
  18. cin.getline(str,mlength,'n');
  19. regex pass1("^[a-zA-Z]+");
  20. while(!regex_match(str,pass1))
  21. {
  22. cout<<"Error"<<endl;
  23. cout << "Please enter a c-string: ";
  24. cin.getline(str,mlength,'n');
  25. }
  26. string Sortstr (str[mlength]);
  27. sort(Sortstr.begin(), Sortstr.end());
  28. }
Add Comment
Please, Sign In to add comment