Submission #385158


Source Code Expand

#include <cstdio>
#include <cstdlib>
#include <string>
#include <string.h>

int main(int argc, char* argv[])
{
        char W [30], Wn[30];

        scanf("%s", W);

        const char* mother = {"aiueo"};

        int index_wn = 0;
        for(int j=0; j<strlen(W); j++){
                char* ret = strchr(mother, W[j]);
                if( ret  == NULL ){
                        Wn[index_wn] = W[j];
                        index_wn++;
                }
        }

        printf("%s\n", Wn);

        return 0;
}

Submission Info

Submission Time
Task B - 罠
User mingori3
Language C++ (G++ 4.6.4)
Score 0
Code Size 544 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main(int, char**)’:
./Main.cpp:16:48: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
./Main.cpp:10:23: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]