I\'m making a function that returns the derivative of a function that is represented as a tree like
/ + \\
* ^
/ \\ / \\
What you're trying to achieve cannot be done in plain C, because it has no operator overloading. You may use strncat
for this, but be advised that this is quite low-level solution that requires you to manage memory manually.
You can do this cleanly in C++ using std::string
or std::wstring
objects, which have proper operator+()
.
Alternatively you could implement your own string structure with appropriate, object-oriented API.