apr24.cpp
来自「矩阵类 简单的矩阵类的编写」· C++ 代码 · 共 35 行
CPP
35 行
// Apr24.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "RationalNumber.h"
#include "Matrix.h"
#include "Complex.h"
#include "MyStr.h"
int main(int argc, char* argv[])
{
MyStr str1;
MyStr str2(str1); //copy constructor
MyStr str3("Hello"); //带char * 的constructor
str1 = str3; //operator =
/* float x[] = {
1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12};
Matrix A(3, 4, x);
float y;
float *p;
p = A[1];
y = p[2];
y = A[1][2];
*/
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?