Hello!!
Again found an error ...
In solution Soln5_5.cpp using fuction 'parse; of new string, function begins to work the string uncorrectly.
Example:
Code:
...
char s1[] = "seventy-one fruit balls, please Doris";
cout << "string is '" << s1 << "'\n\nParsing...\n";
char* p = parse(s1);
while (p)
{
cout << p << endl;
delete[] p; // Delete the string that was returned
p = parse(nullptr);
}
char str2[] = "A new string";
p = parse(str2); //HERE: p = nullptr and next line an error
// cout << p << endl;
return 0;
The fact that the static variable 'start' does not reset during a call to with a new string.