Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cs50.h>
- int main (void)
- {
- int i = get_int("Integer: ");
- printf("hello, %i\n", i);
- }
- $ make int
- clang -fsanitize=signed-integer-overflow -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow int.c -lcrypt -lcs50 -lm -o int
- int.c:5:13: error: implicit declaration of function 'get_int' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
- int i = get_int("Integer: ");
- ^
- int.c:6:21: error: more '%' conversions than data arguments [-Werror,-Wformat]
- printf("hello, %i\n");
- ~^
- int.c:5:9: error: unused variable 'i' [-Werror,-Wunused-variable]
- int i = get_int("Integer: ");
- ^
- 3 errors generated.
- make: *** [int] Error 1
Add Comment
Please, Sign In to add comment