label caption

I am learning now visual c++ and I try to display two variables in the same label but it seems that I don't know how to do it. Here is the code thet works and shows me one variable and works
 
 lblresult->Text = String::Format("The n term of Fibonacci's string is: {0} ",f); 

And the one that doesn't work is:
 
 lblresult->Text = String::Format("The n term of Fibonacci's string is: {0} ",f, n); 
Last edited on
Hi,

I asssume you are using .net, Im unable to test but i think what you need is

 
    lblresult->Text = String::Format("The n term of Fibonacci's string is: {0} {1} ",f,n);


hope this helps
Shredded
Topic archived. No new replies allowed.