Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <cstdio>
- #include <cstdlib>
- using namespace std;
- int main ()
- {
- string glupoty;
- cout << "Pliska wez tu napisz jakies bzdury: "<<endl;
- getline (cin,glupoty);
- cout << "wlasnie napisales " << glupoty << "!\n";
- string korektor = " ,.-!:;";
- korektor = new char[sizeof korektor + 1];
- string schowek;
- schowek = new char[sizeof schowek + 1];
- char cosnowego[sizeof schowek +1];
- char* strcpy (char* schowek, char* cosnowego);
- cout<<"Rozdziela tekst: ->"<<glupoty<<"<- na poszczegolne wyarzy: "<<endl;
- char* strtok( char* cosnowego, const char* korektor );
- while( cosnowego!= NULL)
- {
- cout<<schowek<<endl;
- schowek = strtok( NULL, korektor.c_str() );
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement