title: How to display global variable on messagebox?
body: <p>This is written code,</p>
  
  <pre><code>void horizontal_calculate()
  {
      String ^aa = filenames[0];
      std::string file1(marshal_as&lt;std::string&gt;(aa));
      String ^bb = filenames[1];
      std::string file2(marshal_as&lt;std::string&gt;(bb));
  
      double Result3=horizontal_read(file1);
      double Result4=horizontal_read(file2);
      double result=Result3/Result4;
      result1=result;
      System::Diagnostics::Debug::WriteLine("{0}",result);
  }
  
  private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
  
  
               for (int i = 0; i &lt; filenames-&gt;Length; i++)
                   System::Diagnostics::Debug::WriteLine(filenames[i]);
  
               semicircle();
               horizontal_calculate();
               oblique();
  
  
               MessageBox::Show("Time Ratio = "result1"","Screening Result",MessageBoxButtons::OK, MessageBoxIcon::Information);
           } 
  </code></pre>
  
  <p>I have declared double=result1 as global variable. </p>
  
  <p>It comes out an error "error C2146: syntax error : missing ')' before identifier 'result1'", so how am I going to solve this?   </p>
  
  <p>is it needed and how's the way to convert double to string?</p>
  
  <p>Thanks all.</p>