Ask your own question, for FREE!
Computer Science 18 Online
OpenStudy (anonymous):

Practicing coding in C++ but I am a little bit confused as to what exactly this program is asking for. Program Description: The program will read in a le containing the number of rows and columns stored in the le (one line), followed by one row of data per line. The data is stored in hexadecimal form. Requirements: Your program (modular) must perform the following oper- ations:  Read (store) the image data le.  Allocate image array dynamically.  Write the image in binary (1s and 0s) to another file Does it just want me to convert the image to zero's and one's? And What should

OpenStudy (anonymous):

*And what should my input be?

OpenStudy (rsmith6559):

It looks to me like the le will be a file. It appears the first line will give you the number of columns and number of rows and subsequent rows will be hex data. Was a, probably text, file given with the assignment?

OpenStudy (anonymous):

Yes, they are actually data files (.dat)

OpenStudy (rsmith6559):

You'll need to know what the data in the file is. Is it text? In Unix, you can display any file with the cat <filename> command. With Windows, the command is type <filename> Copy the Program Description into your program file. Break it up by phrases. Make them all comments. Write the code needed for each phrase. If a phrase seems too complicated, break it down further.

OpenStudy (anonymous):

It is text. Thanks, I'll try that and see how far I get before I get a bunch of errors (I know I will get a bunch of errors).

OpenStudy (rsmith6559):

Since most of those are probably typos, compile often just so there aren't an overwhelming amount of them. If you're writing functions, there's a thing called unit testing. For each function that you code, test it before moving on.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!