Submission #111581


Source Code Expand

#include <stdio.h>

int main() {
    char data[100];
    scanf("%s", data);
    for(char *c = data; *c; c++) {
        if (*c == 'a' || *c == 'e' || *c == 'i' || c == 'o' || c == 'u') continue;
        printf("%c", *c);
    }
    printf("\n");
    return 0;
}

Submission Info

Submission Time
Task B - 罠
User forcom
Language C++11 (GCC 4.8.1)
Score 0
Code Size 270 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:7:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         if (*c == 'a' || *c == 'e' || *c == 'i' || c == 'o' || c == 'u') continue;
                                                         ^
./Main.cpp:7:69: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         if (*c == 'a' || *c == 'e' || *c == 'i' || c == 'o' || c == 'u') continue;
                                                                     ^
./Main.cpp:5:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%s", data);
                      ^