Hello,
In the Problem class, you hold a pointer to a char sequence (null terminated string).
The pointer is part of the class, you don't need to allocated the space for that pointer, it's done automatically.
But the pointed "null terminated string" needs to be allocated somewhere.
I see 2 possibilities:
either your "null terminated string" is allocated outside your Problem class, and then when you construct a Problem instance, you pass the pointer to the yet allocated "null terminated string" (don't forget to check if the passed pointer description is not null),
or
you change your Problem class to hold a char array char _description[DESCRIPTION_SIZE]. DESCRIPTION_SIZE is a constant, you define yourself.
You'll then be able to copy the "null terminated string" description into your array _description (don't forget to check boundaries).
Basically, your "I send string and the accepted value is char pointer where the allocation have been made?" is considered as a string literal (some kind of constant).
Those literals are statically stored. It's like a global variable.
They're allocated at the very beginning of your program execution.
Usually, literals are constants. They cannot be changed. But it seems some compilers allow to change them.
In your example, as _description is not constant, I expect your compiler to complain about it. With g++, we just have a warning.
But, if you try to modify the _description you're going to end up with a segment fault.
Declaring your _description as a charconst * _description would be better.