OK,
I am trying to make a Lottery game in Microsoft Visual C++ 2005 Express Edition with windows application format that randomizes 6 numbers, 1-40. I've made the # randomizer, but i cannot get the number to show up on a textBox.
Here is the code that is "bad".
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
textBox1->Text = randNumGen->Next(0,41);
}
And here is the Output.
error C2664: 'void System::Windows::Forms::Control::Text::set(System:string ^)' : cannot convert parameter 1 from 'int' to 'System:string ^'
No user-defined-conversion operator available, or
No standard conversion exists from the boxed form of the arithmetic type to the target type
PLEASE HELP ME FIX THIS PROBLEM!!