c++ cli - How to display global variable on messagebox? -


this written code,

void horizontal_calculate() {     string ^aa = filenames[0];     std::string file1(marshal_as<std::string>(aa));     string ^bb = filenames[1];     std::string file2(marshal_as<std::string>(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) {                (int = 0; < filenames->length; i++)                  system::diagnostics::debug::writeline(filenames[i]);               semicircle();              horizontal_calculate();              oblique();                messagebox::show("time ratio = "result1"","screening result",messageboxbuttons::ok, messageboxicon::information);          }  

i have declared double=result1 global variable.

it comes out error "error c2146: syntax error : missing ')' before identifier 'result1'", how going solve this?

is needed , how's way convert double string?

thanks all.

if problem in messagebox line, write following way:

messagebox::show(     string::format("time ratio = {0}", result1),     "screening result",     messageboxbuttons::ok, messageboxicon::information); 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -