title: How do I fix compiler error: expected '=', ',', ';', 'asm' or 'attribute' before '{' token|"?
body: <p>I am trying to build a code to calculate capacitance reactance in a simple series capacitive reactor for my electronics class. The purpose of the code is irrelevant, as the problem is that I am doing something very wrong and need help with my C skills. This is the formula should you need it:</p>
  
  <p><img src="https://i.stack.imgur.com/t1Dtb.gif" alt="Formula for Capacitance"></p>
  
  <p><strong>Here is my code:</strong>
  (excluding the headers as they cause format errors in the html of the post)</p>
  
  <pre><code>const float pi = 3.145962;
  
  float xc(float frequency, float capacitance)
  
  
  
  
  
  int main()
  {
  
  float capreac;
   float valueofc ()
   float valueoff ()
     capreac = xc(f;c;)
  }
  
  
  float xc(float frequncy, float capaitance);
  {
      float answer;
      answer = (1/(2*pi*capacitance*frequency));
       return(answer);
  
  
  }
  </code></pre>
  
  <p>My IDE is CodeBlocks, which is what my class is using.</p>
  
  <p>It refuses to run, stating "|13|error: expected '=', ',', ';', 'asm' or '<strong>attribute</strong>' before '{' token|" at the "float xc" line and "|6|error: old-style parameter declarations in prototyped function definition|" at the defining line of xc.</p>
  
  <p>Any hope for this newb?</p>