Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdlib>
- #include <cstdio>
- #include <istream>
- using namespace std;
- class String{
- char *str;
- char *str_return;
- public:
- String( string s){
- if (!(s.size() < 12)) s.erase(0, s.find('('));
- cout << s << endl;
- }; //конструктор по-умолчанию
- ~String(); //деструктор
- };
- String::~String(){
- delete[] str;
- };
- int main (){
- string s;
- cout<<"Type anything and press:"<<endl;
- getline(cin,s); //считываем полностью всю строку
- String str(s);
- str.~String();
- return 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement