Question: i need help in lab. i didi checkpoint 1. i m having trouble after it. please help. Evil Hangman In order to begin to build

 i need help in lab. i didi checkpoint 1. i m

having trouble after it. please help. Evil Hangman In order to begin

to build a Hangman game we need a dictionary of words, Last

i need help in lab. i didi checkpoint 1. i m having trouble after it. please help.

Evil Hangman In order to begin to build a Hangman game we need a dictionary of words, Last week you began to build a string opaque object that will help with this task. This week we will continue adding features to the string object to allow us to read and write words from a dictionary. This lab assumes that you have completed all steps involved in labs 1 and 2 Switch to your HANGMAN directory: cdSpring2017/COMP1020/HANGMAN Clean up your directory by typing make clean Add the following declarations to your string.h header file and remember to include stdio.h near the top of the file. //Precondition: hMy_string is the handle to a valid My string object. //Postcondition: hMy string will be the handle of a string object that contains // the next string from the file stream fp according to the following rules. // 1) Leading whitespace will be ignored. // 2) All characters (after the first non-whitespace character is obtained // and included) will be added to the string until a stopping condition is met. The capacity of the string will continue to grow as needed /until all characters are stored 31A stopping condition is met if we read a whitespace character after // we have read at least one non-whitespace character or if we reach // the end of the file. Function will return SUCCESS if a non-empty string is read successfully // and failure otherwise. Remember that the incoming string may aleady // contain some data and this function should replace the data but not // necessarily resize the array unless needed. Status my string_extraction(MY STRING hMy_string, FILE fpl //Precondition: hMy string is the handle to a valid My_string object //Postcondition: Writes the characters contained in the string object indicated // by the handle hMly string to the file stream fp. Function will return SUCCESS if it successfully writes the string and W FAILURE otherwise. Status my string_insertion(MY STRING hMy string, FILE* fpl In addition to following the pre and post-conditions above you need to follow one additional rule for the extraction function. If you read a string from a file stream and then stop on a whitespace then that

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!