title: Calculate volume and surface area of sphere in C++
body: <p>I am trying to write a program which asks for the radius of a sphere, and depending on if the user inputs if they want the volume or the surface area, then that's what the program will return.
  (Before anyone says anything about the program not being done, I know, I'm just trying to get the foundation to work before I add the formula for the volume etc.)</p>
  
  <p>Unfortunately, I can't even get this much to compile because it doesn't seem to acknowledge that I declared the radius.</p>
  
  <p>Chances are, I made some careless mistakes, but after all, we learn and grow from my mistakes.</p>
  
  <p>I don't want this completed for me, I just want guidance for where I went wrong.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  
  using namespace std;
  
  void sphereArea();
  void sphereVolume();
  
  double pi = 3.141596,
  double radius = 0.0;
  
  int main()
  {
  
  cout &lt;&lt; "Please enter the radius of your sphere" &lt;&lt; endl;
  cin &gt;&gt; radius;
  sphereArea();
  system ("pause");
  }
  
  void sphereVolume(){
  
  }
  
  void sphereArea(){
  double Vol;
  Vol = ((4.0 / 3.0) * pi * (radius ^ 3));
  cout &lt;&lt; "The volume of your sphere is " &lt;&lt; Vol &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Edit: Currently I am getting these errors:
  1. On line 27 -> error C2296: '^': illegal, left operand has type 'double' 
  2. Also on line 27 (with regards to radius) -> IntelliSense: expression must have integral or unscoped enum type</p>