Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <cstdio>
  4. #include <cstdlib>
  5.  
  6. using namespace std;
  7.  
  8. int main ()
  9. {
  10.     string glupoty;
  11.    
  12.     cout << "Pliska wez tu napisz jakies bzdury: "<<endl;
  13.     getline (cin,glupoty);
  14.     cout << "wlasnie napisales " << glupoty << "!\n";
  15.  
  16.     string korektor = " ,.-!:;";
  17.     korektor = new char[sizeof korektor + 1];
  18.     string schowek;
  19.     schowek = new char[sizeof schowek + 1];
  20.     char cosnowego[sizeof schowek +1];
  21.     char* strcpy (char* schowek, char* cosnowego);
  22.     cout<<"Rozdziela tekst: ->"<<glupoty<<"<- na poszczegolne wyarzy: "<<endl;
  23.     char* strtok( char* cosnowego, const char* korektor );
  24.     while( cosnowego!= NULL)
  25.     {
  26.         cout<<schowek<<endl;
  27.         schowek = strtok( NULL, korektor.c_str() );
  28.     }
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement