I've been trying to compile my music code for pset3; currently I was able to fix to errors that I had on helpers.c but now I'm receiving errors for synthesize.c and wav.h. My question is 1. am I supposed to write code in these two areas, and 2. if not, how can fix the following errors? Are these errors happening because of my helpers.c code? Below I attached my workspace. Please let me know if I should attach my code as well. Thank you so much!

~/workspace/pset3/music/ $ help50 make
clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 
-O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow -o 
synthesize helpers.c synthesize.c wav.c -lcrypt -lcs50 -lm
synthesize.c:47:25: error: too few arguments to function call, 
expected 3, have
        note_write(s), frequency(note), duration(fraction));
        ~~~~~~~~~~  ^
./wav.h:30:1: note: 'note_write' declared here
bool note_write(song s, int frequency, int duration);
  expanded from macro 'bool'
#define bool _Bool
1 error generated.
make: *** [synthesize] Error 1

1 Answer 1


No, synthesize.c and wave.h should not be changed. All the work is done in helpers.c. However, there are a few things that should not be changed in helpers.c. Most important, the signature line and the number of parameters for the functions should not be changed. If you changed any of the function signatures, they will generate the kind of error you saw.

Did you change synthesize.c? If not, it may be that the file has been corrupted. I suggest redownloading the distribution file and replace with the originals.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

  • While I would probably replace with the synthesize.c from the zip file, just to have a "clean" version, a first try would be removing the ) after note_write(s.
    – Blauelf
    Commented Jul 25, 2018 at 19:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .