1: int main()
2: {
3:   unsigned short x;
4:   unsigned short y
5:   ULONG z;
6:     z = x * y;
6: return 0;
7: }

Please ... i got to many error. When I want z value to write in Textbox form window. Just like var or data from console to form window
How var or identifier seems undeclared in form window with namespace .

7 Years
Discussion Span
Last Post by jonsca

You need proper includes.

#include <iostream>
using namespace std;

int main(){
 int x = 0; //initialize variables
 int y = 0; //initialize variables
 int z = x * y;  //calculate z
 cout << "Z = " << z << endl; //print out the variable 'z'
 return 0;

When I want z value to write in Textbox form window.

That doesn't happen by magic. Go through http://www.functionx.com/vccli/general/introprogramming.htm which will tell you a little about accessing GUI elements. You'll have to make sure you have the right kind of project selected (winforms). In addition, the syntax of the (loose) "dialect" of C++ that is used with them is C++/CLI, which is covered in that site I gave you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.