I see the following three Clang compiler errors when I run greedy.c
:
jharvard@appliance (~/Dropbox/pset1): make greedy
clang -ggdb3 -O0 -std=c99 -Wall -Werror greedy.c -lcs50 -lm -o greedy
greedy.c:7:4: error: expected identifier or '('
{
^
greedy.c:26:13: error: initializer element is not a compile-time constant
int i = round (change*100) ;
^~~~~~~~~~~~~~~~~~
greedy.c:31:4: error: expected identifier or '('
{
^
3 errors generated.
jharvard@appliance (~/Dropbox/pset1):
I ran check50 test of the program.
There is a :!
in front of all the items for testing in the problem specification. As far as I can tell this program appears to pass check50 test in spite of the remaining compiler errors.
Can somebody tell me what these compiler errors are and how to eliminate them?
Ramaswami Sastry Vedam
E mail address: [email protected]