Skip to content

Commit 4b0a1b9

Browse files
committed
doc: add the documentation for new2DArray function
1 parent bf42c91 commit 4b0a1b9

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

libs/utilities.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,20 @@ char* getUserInputStr(char* message, char* onInvalidMessage, int strLength,
5555
*/
5656
int isStrIn(char* str, char* arr[], int arrLength);
5757

58-
// TODO: Documentation
58+
/**
59+
* @brief Initializes a 2D array of characters.
60+
*
61+
* This function dynamically allocates memory for a 2D array of characters with the specified number
62+
* of rows and columns.
63+
*
64+
* @param rows Number of rows.
65+
* @param cols Number of columns.
66+
*
67+
* @return A pointer to the 2D array of characters.
68+
*
69+
* @warning Ensure to free the allocated memory using appropriate deallocation functions to avoid
70+
* memory leaks.
71+
*/
5972
char** new2DArray(int rows, int cols);
6073

6174
/**

0 commit comments

Comments
 (0)