cs50 / help50-deprecated

This is help50, a command-line tool that helps students understand error messages.
https://cs50.harvard.edu/
GNU General Public License v3.0
62 stars 64 forks source link

subscripted value is not an array, pointer, or vector #154

Closed brianyu28 closed 8 years ago

brianyu28 commented 8 years ago
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    Aggie.c  -lcs50 -lm -o Aggie
Aggie.c:21:42: error: subscripted value is not an array, pointer, or vector
                printf("%c", i, toupper(n[i+1]));
                                        ~^~~~
1 error generated.
make: *** [Aggie] Error 1
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    initials.c  -lcs50 -lm -o initials
initials.c:10:27: error: subscripted value is not an array, pointer, or vector
    printf("%c\n", argv[1][1]);
                   ~~~~~~~^~
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    vigenere.c  -lcs50 -lm -lcrypt -o vigenere
vigenere.c:38:44: error: subscripted value is not an array, pointer, or vector
            printf("%c", ((p[j] - 'A') + (k[j] - 'A'))%26 + 'A');
                                          ~^~
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    vigenere.c  -lcs50 -lm -o vigenere
vigenere.c:40:53: error: subscripted value is not an array, pointer, or vector
                   printf("%c", ((letter - 'A' + key[j]) % 26) + 'A');
                                                 ~~~^~
1 error generated.
make: *** [vigenere] Error 1
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    initials.c  -lcs50 -lm -o initials
initials.c:20:33: error: subscripted value is not an array, pointer, or vector
            printf("%s", name[i][1]);
                         ~~~~~~~^~
1 error generated.
make: *** [initials] Error 1
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    caesar.c  -lcs50 -lm -lcrypt -o caesar
caesar.c:8:33: error: subscripted value is not an array, pointer, or vector
    printf("plaintext:%i\n",argc[1]);
                            ~~~~^~
1 error generated.
make: *** [caesar] Error 1
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    initials.c  -lcs50 -lm -lcrypt -o initials
initials.c:24:26: error: subscripted value is not an array, pointer, or vector
                        a[x] = i;
                        ~^~
clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wshadow    vigenere.c  -lcs50 -lm -lcrypt -o vigenere
vigenere.c:26:27: error: subscripted value is not an array, pointer, or vector
        if (isalpha(argv[1[i]]) == false)
                         ~^~
clang -ggdb3 -O0 -std=c11 -Wall -Werror -o find find.c helpers.c -lcs50 -lm
helpers.c:31:24: error: subscripted value is not an array, pointer, or vector
            a = a + n/2[i+1];
                      ~^~~~
dmalan commented 8 years ago

https://github.com/cs50/help50/commit/042d9d39d5b752194dcd3f9060cc242d4bfbe1ba