Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Hello to everybody.

$
0
0

i wrote these in Visual C++ 6 & now i want to write in Visual C++ 2010. i don't know C++ syntax very well so i want to know how can i convert results from int to string. please help. thanks for attention.

P.S: this is the sample code. main aim learning this langş :))

protected: System::Void button1_Click(System::Object^sender, System::EventArgs^ e) { int a[3][3], b[3][3], c[3][3], i,j,k;

a[0][0] = 1; a[0][1] = 0; a[0][2] = 0; a[1][0] = 0; a[1][1] = 1; a[1][2] = 0; a[2][0] = 0; a[2][1] = 0; a[2][2] = 1;

b[0][0] = 1; b[0][1] = 0; b[0][2] = 0; b[1][0] = 0; b[1][1] = 1; b[1][2] = 0; b[2][0] = 0; b[2][1] = 0; b[2][2] = 1; for (i=0; i<3; i++) { for (j=0; j<3; j++) { c[i][j] = 0; for (k=0; k<3; k++) { c[i][j] = c[i][j] + a[i][k]*b[k][j]; } } } CString bir; bir.Format("%d", c[0][0]); edit1 = bir; CString iki; iki.Format("%d", c[0][1]); edit2 = iki; CString uc; uc.Format("%d", c[0][2]); edit3 = uc; CString dord; dord.Format("%d", c[1][0]); edit4 = dord; CString bes; bes.Format("%d", c[1][1]); edit5 = bes; CString alti; alti.Format("%d", c[1][1]); edit6 = alti; CString yeddi; yeddi.Format("%d", c[2][0]); edit7 = yeddi; CString sekkiz; sekkiz.Format("%d", c[2][1]); edit8 = sekkiz; CString doqquz; doqquz.Format("%d", c[2][2]); edit9 = doqquz; }


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>