Hey I am new to the Visual C++ 2005.
When working on windows forms how can I accept integer variables from user entered on a text box and how to display an integer value on a text box?
Thank You.
Hey I am new to the Visual C++ 2005.
When working on windows forms how can I accept integer variables from user entered on a text box and how to display an integer value on a text box?
Thank You.
er, im not sure what you mean.... I have Microsoft Visual C++ 2005 aswell, to acsess and display user integers and then display them you would do this:
I am not sure what you mean by text box so i appligise if this is the complete wrong answerCode:#include <iostream> using namespace std; int main() { int number; // declare integer variable to be entered by user cout << "Please enter a number: "; cin >> number; // display number cout << "\n\nYou entered the number: " << number << endl; return 0; }
lol!!
textbox is a form object in Visual C++ .NET programming (similar to the one in Visual Basic).
Surely if you're reading the text from a textbox you can just convert the string to an integer using stringstream?
Here's a little pseudocode for you (since I don't use Windows forms or 2005):
Or something... ?Code:procedure the_func () number :integer; ss :stringstream; number = ss << textbox.text; end;
EDIT: Sorry if this doesn't help, I don't use .NET
Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.
- Mike McShaffry