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 .

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.