I make a program in c ++ (Windows Forms). And I need to enter a series of numbers, for example,
int x = textBox1->text; But I get an error.
You have a text property; not a numeric type at all, but a text one. See how you can convert a test type to integer (int)
int x = Parce.ToInt ( textBox1->text); I don’t remember exactly how to use parsis. )
If you are programming in C #, then you need
int x = Convert.ToInt32(textBox1.text); and if C ++, then
int x = Int32::Parse(textBox1->text); Source: https://ru.stackoverflow.com/questions/32723/
All Articles