Question: c++ Write a program with that reads the name of a file that contains a grid of characters using the format illustrated here: 3 x

c++

Write a program with that reads the name of a file that contains a grid of characters using the format illustrated here:

3 x 5 HANDS GLOVE NAILS

... and then reads in commands from the user of the following forms:

row i - which prints the index i row (starting with zero)

col i - which prints the index i column (starting with zero)

quit - which ... quits!

SAMPLE RUN

run 1
p3in1.txt
run 2
p3in2.txt
p3in1.txt row 0 H A N D S col 0 H G N row 2 N A I L S col 1 A L A quit
3 x 5 HANDS GLOVE NAILS
~/$ ./prob3 p3in2.txt row 3 A T T A C K W E col 4 O E E C T A R quit
7 X 8 H E L L O O U T T H E R E C A R B E T T E R R U A T T A C K W E R E E L T A I L A T R E A T R U A S S E R T T V

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!