Hot answers tagged

2 votes
Accepted

For week 4 walkthrough unused variable even though I typed the same code as David

Actually, it's not really anything to do with the code you've typed in. Its the clang compiler complaining. The breakout.c program would also suffer the same fate if clang was not told to suppress ...
2 votes
Accepted

Unused Variable, then Undeclared

Change when declared inside the loop has local scope, and that's why compiler isn't able to recognize it, try declaring it before the loop. float Change; do { printf ("How much change do you ...
  • 3,336
1 vote
Accepted

Pset3 - Music: Unused parameters and control reaches end of non-void function errors

There are a few simple issues. First, octave is being declared and then redeclared, but, amusingly, that isn't the actual problem. The real problem is that they are being declared inside of code ...
  • 64.6k
1 vote
Accepted

Pset2 caesar unused variable

Your instincts are more or less correct. You have actually declared key twice, once as a global and a second time as a local var inside main(). Specifically, the line int key = atoi(argv[1]); is the ...
  • 64.6k

Only top scored, non community-wiki answers of a minimum length are eligible