From 24556d0f58392835f7aefc0814391db1b1efc309 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 9 Feb 2024 16:52:02 -0500 Subject: [PATCH] about initializing the matrix --- hws/03_amazon_prime/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hws/03_amazon_prime/README.md b/hws/03_amazon_prime/README.md index a2bf907..695b37b 100644 --- a/hws/03_amazon_prime/README.md +++ b/hws/03_amazon_prime/README.md @@ -146,7 +146,7 @@ void process_one_line(int** matrix, int i, std::string& line){ } ``` -This function will help you to parse information from the input file, and update the matrix. This function takes three arguments, the first argument is a two-dimensional integer pointer, also known as the matrix pointer, which is expected to point to the beginning memory location of a two-dimensional array. This function assumes the caller allocates and reclaims memory for matrix. The second argument is the index i, indicating which row of the matrix will be updated. The third argument is the string line, which represents one line of the input file. +This function will help you to parse information from the input file, and update the matrix. This function takes three arguments, the first argument is a two-dimensional integer pointer, also known as the matrix pointer, which is expected to point to the beginning memory location of a two-dimensional array. This function assumes the caller allocates and reclaims memory for matrix - **it also assumes that every element of the matrix is initialized to 0**. The second argument is the index i, indicating which row of the matrix will be updated. The third argument is the string line, which represents one line of the input file. To understand what this function does, let's take the first line of the [movieRatings.txt](movieRatings.txt) as an example.