I am sorry this pset has been such a struggle for you. I think you are really close to the finish line. Take a deep breath and let's go through this step by step. The most important thing is that you do not lose the code you have worked so hard on.
The plan:
- Backup your work. There is no such thing as too much backup.
- Restore Makefile, find.c and helpers.h from the distro code
- make the "find" executable
- Whistle a happy tune
The execution:
In a new terminal window:
cd pset3 cp -r find SAVEfind
This will create a copy of your find directory in a new directory called SAVEfind.
Follow the instructions in the Problem Set 3 document to download the distro code, but DO NOT UNZIP. We are going to restore only the 3 files mentioned above. unzip allows you to select the files you wish to retrieve. From your workspace directory:
unzip pset3.zip pset3/find/Makefile unzip pset3.zip pset3/find/find.c unzip pset3.zip pset3/find/helpers.h
Now you have fresh copies of those three files.
- Navigate to pset3/find directory and execute
make clean
. This will ensure that make starts with a clean slate. Now executemake
.
I hope I hear whistling! :)
For the record, here is my thinking from reading through your posts. You originally wrote your routines in helpers.c; you added a "main" loop and variables, so it would be a stand-alone program that you could test. That made it difficult to integrate it back into the find application and it was downhill from there. By now you are very frustrated and it makes it difficult to find your way back to where you were when your routines were working.
I thought I rememberedThere's a goodgreat discussion of libraries in the course materials somewhere, but I can't find it. I would hate to add confusion at this point, so I will keep looking and post a comment when I find what I'm looking forWeek 1 Shorts.
:wq