Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cs50.h>
- #include <stdio.h>
- int main (void)
- {
- int hash =get_int();
- int height = get_int();
- do
- {
- printf("height: ");
- int height = get_int();
- printf("you chose int %i" , height);
- }
- while
- ( height < 1 || height > 24 );
- for
- ( char hash = 0 ; hash > 1 ; hash++ )
- printf (" # %i\n" , hash );
- printf(" %i\n" , hash );
- }
- ERRORS
- mario.c:15:8: error: declaration shadows a local variable
- [-Werror,-Wshadow]
- int height = get_int();
- ^
- mario.c:10:8: note: previous declaration is here
- int height = get_int();
- ^
- mario.c:22:11: error: declaration shadows a local variable
- [-Werror,-Wshadow]
- ( char hash = 0 ; hash > 1 ; hash++ )
- ^
- mario.c:9:8: note: previous declaration is here
- int hash =get_int();
- ^
- 2 errors generated.
- make: *** [mario] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement