Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ PROGRAM PLEASE! Create a C++ program to check to see if a string exists in a given matrix of characters using recursion. Your program
C++ PROGRAM PLEASE!
Create a C++ program to check to see if a string exists in a given matrix of characters using recursion. Your program should read the dimensions of the character matrix from an input file. It should then read the matrix and load it into a dynamically allocated 2D-array. Finally, it should read the string to be found. Output the word true if the string can be constructed from characters in the matrix, and the word false otherwise. The string can be constructed from a sequence of character of adjacent index, where adjacent an index is connected horizontally or vertically, but not wrapping around edges. 1. Input files - The first line of the input will contain two integers ' m ' and ' n ', separated by a single space. ' m ' represents the number of rows and ' n ' represents the number of columns. - The following ' m ' lines will each contain ' n ' number of characters, each character will be separated by a single space. - The last line in the input will contain the string to be searched in the matrix. - Each character in the matrix can only be used once, meaning that once a character has been visited, it cannot be visited again. - All character and string in the input will be in lowercase - There will be no extra lines and whitespaces in the input. 2. Output files - Output the word true if the string exists in the matrix; otherwise output the word false. COSC 2436 lab1: Word Search with Recursion 4. Reminder - Turn in your lab assignment to our Linux server, follow the link here for more instructions. - Make sure to only have one (1) .cpp file with the main() function in your working directory, otherwise your program will fail the grading script. - Create a folder under your root directory, name the folder labl (case sensitive), copy all your .cpp and .h files to the folder (ArgumentManager.h is also needed) o Only include the necessary files (.cpp and .h files) in your working directory in your final submissionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started