This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/SoftwareDesign/Lab1/1-1c/main.cpp

22 lines
530 B
C++
Raw Normal View History

2022-03-12 06:14:22 +00:00
/*
* @Author: iR
2022-03-15 09:09:12 +00:00
* @Date: 2022-03-15 16:47:44
2022-03-12 06:14:22 +00:00
* @LastEditors: iR
2022-03-15 09:09:12 +00:00
* @LastEditTime: 2022-03-15 16:52:26
2022-03-12 06:14:22 +00:00
* @FilePath: \Code\1-1c\main.cpp
* @Description:
2022-03-15 09:09:12 +00:00
* @Mail: i@iridium.cyou
2022-03-12 06:14:22 +00:00
*/
#include "../inc/matrix.hpp"
#include <stdio.h>
int main()
{
2022-03-15 09:09:12 +00:00
int data[] = {1, 2, 3, 4};
Matrix<int> b;
Matrix<int> a(2, 2, data);
b = a;
a.at(0, 0) = 5;
printf("[%d,%d,%d,%d]\n", a.at(0, 0), a.at(0, 1), a.at(1, 0), a.at(1, 1));
printf("[%d,%d,%d,%d]", b.at(0, 0), b.at(0, 1), b.at(1, 0), b.at(1, 1));
2022-03-12 06:14:22 +00:00
return 0;
2022-03-15 09:09:12 +00:00
}