Here's a C++ program that uses multithreading to perform matrix multiplication on two large matrices. The program reads the matrices from text files and writes the result to another text file. It also measures and displays the time taken for the operation.

```cpp
#include <iostream>
#include <fstream>
#include <vector>
#include <thread>
#include <chrono>

using namespace std;

void multiply_matrices(const vector<vector<int>>& A, const vector<vector<int>>& B,
                       vector<vector<int>>& C, int start_row, int end_row) {
    for (int i = start_row; i < end_row; ++i) {
        for (int j = 0; j < B[0].size(); ++j) {
            for (int k = 0; k < A[0].size(); ++k) {
                C[i][j] += A[i][k] * B[k][j];
            }
        }
    }
}

vector<vector<int>> read_matrix_from_file(const string& filename) {
    ifstream input(filename);
    int rows, cols;
    input >> rows >> cols;
    vector<vector<int>> matrix(rows, vector<int>(cols));
    for (int i = 0; i < rows; ++i) {
        for (int j = 0; j < cols; ++j) {
            input >> matrix[i][j];
        }
    }
    return matrix;
}

void write_matrix_to_file(const string& filename, const vector<vector<int>>& matrix) {
    ofstream output(filename);
    output << matrix.size() << " " << matrix[0].size() << endl;
    for (const auto& row : matrix) {
        for (int val : row) {
            output << val << " ";
        }
        output << endl;
    }
}

int main() {
    // Read matrices from files
    vector<vector<int>> A = read_matrix_from_file("matrixA.txt");
    vector<vector<int>> B = read_matrix_from_file("matrixB.txt");

    // Check if matrices can be multiplied
    if (A[0].size() != B.size()) {
        cerr << "Error: Matrices cannot be multiplied" << endl;
        return 1;
    }

    // Initialize result matrix
    vector<vector<int>> C(A.size(), vector<int>(B[0].size(), 0));

    // Measure time taken for the operation
    auto start_time = chrono::high_resolution_clock::now();

    // Perform matrix multiplication using multithreading
    int num_threads = thread::hardware_concurrency();
    vector<thread> threads(num_threads);
    int rows_per_thread = A.size() / num_threads;

    for (int i = 0; i < num_threads; ++i) {
        int start_row = i * rows_per_thread;
        int end_row = (i == num_threads - 1) ? A.size() : start_row + rows_per_thread;
        threads[i] = thread(multiply_matrices, ref(A), ref(B), ref(C), start_row, end_row);
    }

    for (auto& t : threads) {
        t.join();
    }

    auto end_time = chrono::high_resolution_clock::now();
    auto duration = chrono::duration_cast<chrono::milliseconds>(end_time - start_time).count();

    // Write result to file
    write_matrix_to_file("result.txt", C);

    cout << "Matrix multiplication completed in " << duration << " milliseconds." << endl;

    return 0;
}
```

To use this program, create two text files named `matrixA.txt` and `matrixB.txt` with the following format:

```
<number_of_rows> <number_of_columns>
<row_1_values_separated_by_spaces>
<row_2_values_separated_by_spaces>
...
```

For example:

```
3 3
1 2 3
4 5 6
7 8 9
```

After running the program, you'll find a new text file named `result.txt` containing the result of the matrix multiplication. The time taken for the operation will be displayed on the console.
다음은 멀티스레딩을 사용하여 두 개의 큰 행렬에 대해 행렬 곱셈을 수행하는 C++ 프로그램입니다. 이 프로그램은 텍스트 파일에서 행렬을 읽고 결과를 다른 텍스트 파일에 씁니다. 또한 연산에 걸린 시간을 측정하고 표시합니다.

```cpp
#include <iostream>
#include <fstream>
#include <vector>
#include <thread>
#include <chrono>

using namespace std;

void multiply_matrices(const vector<vector<int>>& A, const vector<vector<int>>& B,
                       vector<vector<int>>& C, int start_row, int end_row) {
    for (int i = start_row; i < end_row; ++i) {
        for (int j = 0; j < B[0].size(); ++j) {
            for (int k = 0; k < A[0].size(); ++k) {
                C[i][j] += A[i][k] * B[k][j];
            }
        }
    }
}

vector<vector<int>> read_matrix_from_file(const string& filename) {
    ifstream input(filename);
    int rows, cols;
    input >> rows >> cols;
    vector<vector<int>> matrix(rows, vector<int>(cols));
    for (int i = 0; i < rows; ++i) {
        for (int j = 0; j < cols; ++j) {
            input >> matrix[i][j];
        }
    }
    return matrix;
}

void write_matrix_to_file(const string& filename, const vector<vector<int>>& matrix) {
    ofstream output(filename);
    output << matrix.size() << " " << matrix[0].size() << endl;
    for (const auto& row : matrix) {
        for (int val : row) {
            output << val << " ";
        }
        output << endl;
    }
}

int main() {
    // Read matrices from files
    vector<vector<int>> A = read_matrix_from_file("matrixA.txt");
    vector<vector<int>> B = read_matrix_from_file("matrixB.txt");

    // Check if matrices can be multiplied
    if (A[0].size() != B.size()) {
        cerr << "Error: Matrices cannot be multiplied" << endl;
        return 1;
    }

    // Initialize result matrix
    vector<vector<int>> C(A.size(), vector<int>(B[0].size(), 0));

    // Measure time taken for the operation
    auto start_time = chrono::high_resolution_clock::now();

    // Perform matrix multiplication using multithreading
    int num_threads = thread::hardware_concurrency();
    vector<thread> threads(num_threads);
    int rows_per_thread = A.size() / num_threads;

    for (int i = 0; i < num_threads; ++i) {
        int start_row = i * rows_per_thread;
        int end_row = (i == num_threads - 1) ? A.size() : start_row + rows_per_thread;
        threads[i] = thread(multiply_matrices, ref(A), ref(B), ref(C), start_row, end_row);
    }

    for (auto& t : threads) {
        t.join();
    }

    auto end_time = chrono::high_resolution_clock::now();
    auto duration = chrono::duration_cast<chrono::milliseconds>(end_time - start_time).count();

    // Write result to file
    write_matrix_to_file("result.txt", C);

    cout << "Matrix multiplication completed in " << duration << " milliseconds." << endl;

    return 0;
}
```

이 프로그램을 사용하려면 다음 형식의 `matrixA.txt` 및 `matrixB.txt`라는 두 개의 텍스트 파일을 생성합니다:

```
<number_of_rows> <number_of_columns>
<row_1_values_separated_by_spaces>
<row_2_values_separated_by_spaces>
...
```

For example:

```
3 3
1 2 3
4 5 6
7 8 9
```

프로그램을 실행하면 행렬 곱셈의 결과가 포함된 'result.txt'라는 이름의 새 텍스트 파일을 찾을 수 있습니다. 연산에 걸린 시간이 콘솔에 표시됩니다.