title: I'm making a simple program to calculate vector resultants and I can't figure out why it isn't working.
body: <p>I'm extremely new with programming, and I mostly pieced this together straight out of textbooks, but I cannot get the damn thing to work. For some reason, my doubles (F1 for example) say that they haven't been declared. Here's the code.</p>
  
  <pre><code>// Vector Resultant Calculator by Jeffrey Weissman
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  using namespace std;
  int main()
  {
      double F1 = 0, double F2 = 0, double F3 = 0, double F4 = 0; // The initial forces
      double A1 = 0, double A2 = 0, double A3 = 0, double A4 = 0; // The initial angles
      double F1x = 0, double F2x = 0, double F3x = 0, double F4x = 0; // The calculated horizontal components
      double F1y = 0, double F2y = 0, double F3y = 0, double F4y = 0; // The calculated vertical components
      double Rx = 0, double Ry = 0, double R = 0, double RA = 0; // The calculated attributes of the Resultant Vector R
      string unit; // The unit of the force magnitudes
  
      std::cout &lt;&lt; "Welcome to Jeffrey Weissman's Vector Resultant Calculator./n To begin, please enter the magnitude of the first vector. For now, please ignore all units.";
      std::cin &gt;&gt; F1; 
      std::cout &lt;&lt; "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis.";
      std::cin &gt;&gt; A1;
  
      std::cout &lt;&lt; "Thank you. Please enter the magnitude of the second vector.";
      std::cin &gt;&gt; F2;
      std::cout &lt;&lt; "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis.";
      std::cin &gt;&gt; A2;
  
      std::cout &lt;&lt; "Thank you. Please enter the magnitude of the third vector. If there is not a third vector, please enter 0";
      std::cin &gt;&gt; F3;
      std::cout &lt;&lt; "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis. If there is not a third vector, please enter 0.";
      std::cin &gt;&gt; A3;
  
      std::cout &lt;&lt; "Thank you. Please enter the magnitude of the fourth vector. If there is not a fourth vector, please enter 0";
      std::cin &gt;&gt; F4;
      std::cout &lt;&lt; "Thank you. Please enter the angle, in degrees, of the vector. Please count the angle counterclockwise from the x axis. If there is not a fourth angle, please enter 0.";
      std::cin &gt;&gt; A4;
  
      std::cout &lt;&lt; "Thank you. Now, please enter the unit of the force magnitudes.";
      std::cin &gt;&gt; unit;
  
      F1 * cos(A1) = F1x, F2 * cos(A2) = F2x, F3 * cos(A3) = F3x, F4 * cos(A4) = F4x;
      F1 * sin(A1) = F1y, F2 * sin(A2) = F2y, F3 * sin(A3) = F3y, F4 * sin(A4) = F4y;
  
      F1x + F2x + F3x + F4x = Rx;
      F1y + F2y + F3y + F4y = Ry;
  
      tan(Ry / Rx) = RA;
      Rx * Rx + Ry * Ry = R ^ 2;
      std::cout &lt;&lt; "The Vector Resultant has magnitude " &lt;&lt; R &lt;&lt; " at an angle " &lt;&lt; RA &lt;&lt; " degrees from the x axis.";
  
  }
  </code></pre>