how can I include all the input words?Code:string s; cin >> s;
f.ex if I write hello world and try to cout << s; only "hello" will be couted.
Is there some standard string methods for this, or do I need to use chars? I dont really want to
reinvent the wheel if I dont have to.
How can I delete a char array like this: char a; ?
This is what I tried:
Code:char a; a = 'a'; a = 'b'; a = '\0'; char *b; b = a; cout << b << endl; // just to check the value to be displayed before we try to delete it delete b; cout << "trying to delete b, b is now:" << endl; cout << b << endl; // it still has the same value, why? whats wrong?
Hope anyone can help!