Timeline for pset3 music - value inf is outside the range of representable values of type 'int'
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 21, 2018 at 0:41 | comment | added | Prav Elan | Wow, thank you very much for your help :) | |
Jul 19, 2018 at 14:29 | comment | added | Blauelf |
They use files that look for a function with signature int frequency(string) (the parameter names don't matter for the signature, only number/order and types do), so yes, you have to change your code in a way it presents such a function.
|
|
Jul 19, 2018 at 13:34 | comment | added | Prav Elan | Hmmm I see... My code does compile and it behaves as expected, it's just that it does not pass check50. Does that mean that I have to modify my code back to int frequency(string)? Thank you for your help. | |
Jul 19, 2018 at 13:16 | comment | added | Blauelf |
Your notes.c and synthesize.c are probably ignored. The checker's code is looking for a function of signature int frequency(string) . No wonder it won't compile.
|
|
Jul 19, 2018 at 13:05 | comment | added | Prav Elan | The isPowerTwo function was created within helpers.c and updated to helpers.h | |
Jul 19, 2018 at 13:05 | comment | added | Prav Elan | I changed helpers.h, notes.c and synthesize.c . The only change I made is to create a new function bool isPowerOfTwo(unsigned int x) which is to determine the power of two of a number and also to change the function - int frequency(string note, const string NOTES[]) where I included an extra parameter const string NOTES[ ] which I took from the top of notes.c. I also updated the frequency function in notes.c and synthesize.c | |
Jul 19, 2018 at 10:12 | comment | added | Blauelf |
So we are talking about a compile error (in a programme we don't have, which is including helpers.c ). Based on your first comment, I thought it were a runtime error. You only changed helpers.c and bday.txt , I hope?
|
|
Jul 19, 2018 at 8:42 | comment | added | Prav Elan | Sure. cs50.me/checks/7a7775d8622d9d35b4818d96925f94f6aeabfff6 | |
Jul 19, 2018 at 8:05 | comment | added | Blauelf | Which test case throws this error? Can you link the check50 report? | |
Jul 19, 2018 at 7:52 | comment | added | Prav Elan | No, both of them have not pointed me to any mistake. | |
Jul 16, 2018 at 8:10 | comment | added | Blauelf |
Does ./synthesize boat.wav < songs/boat.txt throw any error? Does valgrind ./synthesize boat.wav < songs/boat.txt point you to any mistake?
|
|
Jul 14, 2018 at 0:38 | comment | added | Prav Elan | Thank you for pointing out my mistakes. My code can now compile and it no longer returns the error. However, I still get 'expected exit code 0, not 1 ' when I ran my code through check50. Do you happen to know why this may happen? Once again, thank you. | |
Jul 14, 2018 at 0:36 | vote | accept | Prav Elan | ||
Jul 13, 2018 at 14:00 | history | answered | Blauelf | CC BY-SA 4.0 |