Windows窗体问题,

时间:2011-04-07 01:48:07

标签: variables c++-cli messagebox

为什么这不起作用?我如何使它工作?

int guess = 0;

MessageBox::Show("The value of guess is ", guess)

2 个答案:

答案 0 :(得分:2)

也许你想要这个:

MessageBox::Show("The value of guess is " + guess.ToString());

MessageBox::Show(String.Format("The value of guess is {0}", guess));

答案 1 :(得分:0)

使用MessageBox::Show("The value of guess is "+guess.ToString());