C++?????ú???????????
???????????? ???????[ 2015/12/7 11:50:36 ] ??????????????????? .NET
???????????????????????????????????????????????????????C++?????????????????????????????????????????????????????ú???????????????????????????????????????????????д???
1 #include <iostream>
2
3 using namespace std;
4
5 void MultMatrix(float M[4]?? float A[4]?? float B[4])
6 {
7 M[0] = A[0]*B[0] + A[1]*B[2];
8 M[1] = A[0]*B[1] + A[1]*B[3];
9 M[2] = A[2]*B[0] + A[3]*B[2];
10 M[3] = A[2]*B[1] + A[3]*B[3];
11
12 cout << M[0] << " " << M[1] << endl;
13 cout << M[2] << " " << M[3] << endl;
14 }
15
16 int main()
17 {
18 float A[4] = { 1.75?? 0.66?? 0?? 1.75 };
19 float B[4] = {1?? 1?? 0?? 0};
20
21 float *M = new float[4];
22 MultMatrix(M?? A?? B);
23
24 cout << M[0] << " " << M[1] << endl;
25 cout << M[2] << " " << M[3] << endl;
26 delete[] M;
27
28 return 0;
29 }
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11