Skip to main content

Timeline for cant compile water.c

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Nov 30, 2016 at 21:04 comment added tanderson never mind i fixed an error. i have 2 different errors now error: data argument not used by format string [-Werror,-Wformat-extra-args] printf("The amount of waterbottles used for your shower is: %d\n", shower, a/y) error: control reaches end of non-void function [-Werror,-Wreturn-type]
Nov 30, 2016 at 20:23 comment added Cliff B You're going forward. Sometimes, one error can mask a bunch of other errors. You just have to work your way through them. This will help with one of them: cs50.stackexchange.com/questions/2448/…
Nov 30, 2016 at 20:10 comment added tanderson ~/workspace/pset1/ $ make water clang -fsanitize=integer -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow water.c -lcrypt -lcs50 -lm -o water water.c:15:80: error: data argument not used by format string [-Werror,-Wformat-extra-args] printf("The amount of water bottles used for your shower is %d\n", shower, a/y); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ water.c:16:1: error: control reaches end of non-void function [-Werror,-Wreturn-type] } ^ 2 errors generated. make: *** [water] Error 1
Nov 30, 2016 at 20:10 comment added tanderson so i changed int main(void) to int water(void) and get a new set of errors. and im taking steps backwards?
Nov 30, 2016 at 6:26 history answered Cliff B CC BY-SA 3.0