#include #include using namespace std; const long CinStrLen(long * puiLength) { char ch = 0; cin.get(ch); cout << "c = " << ch; if(ch != '\n') { cout << endl; CinStrLen(puiLength); *puiLength += 1; cout << "c = " << ch << endl; } cin.putback(ch); return *puiLength; } int main(void) { long *p = new long(); CinStrLen(p); cout << "length = " << *p; char *z = new char (*p+1); cin >> z; cout << endl << z << endl << "bye"<< endl; delete p; cin.get(); }