title: Derivative Calculator using LinkedList C++
body: <p>I'm trying to make a derivative calculator (I have to use linked list).</p>
  
  <p>The structure of every node should be as follows:</p>
  
  <pre><code>struct node {
      int coefficient;
      string function;
      int power;
      node*fx;
      node*gx;
      node*next;
  };
  </code></pre>
  
  <p><strong>| Coefficient | Function | Power | f(x) | g(x) | next |</strong></p>
  
  <hr>
  
  <p>Input representation example:</p>
  
  <p>3x^2((3x-3)/(4x-2)) + sin(4x-3)</p>
  
  <p>coefficient*function^power(f(x)/g(x)) + next</p>
  
  <hr>
  
  <p>I tried using RegEx but it's not easy to work with when it comes to nesting expressions since the user might throw an unknown number of functions.</p>
  
  <p>I know that I have to parse the expression somehow, then split everything into a vector and then fill in the nodes but I'm just not able to code that logic since I'm fairly new to C++.</p>
  
  <p>I also tried working with ExprTk but I found it hard to understand and I couldn't find any online tutorials for it except the readme file that comes with it.</p>
  
  <p>If anyone can guide me in the right direction or show me a tutorial that would be great.</p>