As always, it helps to break this down into tasks.
If I've understood this correctly, you need to:
- Obtain the number S as a string
- Identify every possible set of substrings of S, so that, for example, ['929'] is one such set, ['92', '9'] is another, etc
- For each such set:
- convert the substrings to numbers
- construct the corresponding form of the polynomial, e.g. 929.0, or 92 + (9 * x), etc
- calculate the value of the ponynomial, e.g. 929.0, or 254.13390533271604, etc
- Identify which of those results is the lowest
- Identify which of the sets of substrings corresponds to that lowest result
Have I understood that correctly?
If so, which of those steps is the one you are having trouble with?
Also, what do you mean by "dynamic programming"? Do you mean that your code must dynamically allocate memory on the heap? Or do you mean something else?
EDIT:
It looks as though you got some detailed answers to this question in an older thread of yours:
http://www.cplusplus.com/forum/general/277529/
What was wrong with those answers? And why are you creating multiple threads for the same question, rather than continuing to discuss this in the thread you already had?