Advertisement
edutedu

functia strtok

Apr 2nd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char a[100], separatori[]=".,|", *p;
  8. cin.get(a, 100);
  9. p=strtok(a, separatori);
  10. while(p)
  11. {
  12. cout<<p<<endl;
  13. p=strtok(NULL, separatori);
  14. }
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement