Question: ========================================================================================================== This is a long ask, but it wouldn't make sense to split this into multiple questions; so to give proper credit, if you complete
==========================================================================================================
This is a long ask, but it wouldn't make sense to split this into multiple questions; so to give proper credit, if you complete this successfully I will create multiple additonal "Chegg Questions" and provide you the immediate link so you can get the appropriate multiple upvotes.
Additionally, there are several other portions to be completed after this. If you are interested in answering those as well in consecutive order, let me know and I will create the questions and give you the direct link and the only upvotes.
*This is to be done only in C (Not C++).
**When it says modify your current makefile, this is what I currently have:
CC = gcc CFLAGS = -Wall -g --std=c99 OBJECTS = main.o
hello: $(OBJECTS) $(CC) $(CFLAGS) -o hello $(OBJECTS) main.o:main.c $(CC) $(CFLAGS) -c main.c -o main.o clean: rm hello $(OBJECTS)
===============================================================================================




This semester we will be building a project that plays the game of Hangman in a strange way. In order to begin this process we need to build a working string type for ourselves using opaque objects. Your task for this week is to set up the project makefile area and write a few initialization functions, the destroy function, and a working string compare function as well as writing some test code to test all of these operations. The lab assumes that you have completed all steps involved in lab-1 Modify your Makefle so that it makes an executable named string .driver instead of one named hello You will have to also modify the rule for clean so that it removes the correct file instead of the executable hello We need some additional files for our string type. Create a mv string.h interface file and a mv stringS implementation file. Create rules in your Makefile for the following: e. Create rules in your Makefile for the following 1. You need a rule for a my string.o object file which depends on my stringh and my string.c 2. Add my string.e to the list of objects in the OBJECTS variable You should be able to build the project using make even though the new files are completely empty Your directory should contain the following files after you run make: dbadams@cs3:/Spring2017/cOMP1020/HANGMAN$ Is Verify that your "make clean" still cleans up all of the object files Make the project again and then type make once more so that you get the message: make: string. driver is up to date Type "touch my string.b" and hit enter. Then type make again. This should force a recompile of mv string.e and, because of the dependency on mv string.Q, string driver Notice how main.g did not need to be recompiled because we have not yet added a dependency on mv string.b for main.o. We are now ready to begin writing our own string library. We will begin by making a handle type and the bookends, an init default function for my string and a destroy function Create a new handle type for our string type by simply adding a line to our UgD file that renames void* to be MY_STRING. MY_STRING will then become the type for any handle holding on to one of our mv string opaque objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
