Submission #112265


Source Code Expand

#include <stdio.h>

main(){

	char w1[30];
	char w2[];
	int n1 = 0;
	int n2 = 0;
	scanf("%c",&w1);

	for(n1 = 0;n1<30;n1++){
		if(w1==a||w1==i||w1==u||w1==e||w1==o){
			continue;
		}
		w2[n2] = w1[n2];
		n2++;
	}
	printf("%c\n",w2);

}

Submission Info

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

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:6:10: error: storage size of ‘w2’ isn’t known
./Main.cpp:9:16: warning: format ‘%c’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[30]’ [-Wformat]
./Main.cpp:12:10: error: ‘a’ was not declared in this scope
./Main.cpp:12:17: error: ‘i’ was not declared in this scope
./Main.cpp:12:24: error: ‘u’ was not declared in this scope
./Main.cpp:12:31: error: ‘e’ was not declared in this scope
./Main.cpp:12:38: error: ‘o’ was not declared in this scope
./Main.cpp:9:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]