The problem is your expressions of this form:
(new string *)(c1)
The left side is not a type, it is an expression. When you suffix with another expression in parentheses, it looks like a function call, but this only works if the left expression is the name of the function or the pointer to the function. In this case, the new expression has a type std::string**that is not a function pointer.
char, new, ; . , a char . 1 - , :
std::string(1, c1);
- .
return std::string(1, c1) + std::string(1, c2);
, , return for, , compination.