Submission #00190
ソースコード
ステータス
項目 |
データ |
問題 |
0002 - 2012年12月02日 |
ユーザー名 |
ei1421
|
投稿日時 |
2015-12-02 18:20:27 |
言語 |
C++11 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
758 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:20: error: conflicting declaration ‘char m [101]’
char y[101],m[101],d[101];
^
./Main.cpp:5:17: note: previous declaration as ‘int m’
int i,j,k=0,l,m;
^
./Main.cpp:18:8: error: invalid types ‘int[int]’ for array subscript
m[k] = a[i];
^
./Main.cpp:21:6: error: invalid types ‘int[int]’ for array subscript
m[2] = '\0';
^
./Main.cpp:30:13: error: invalid conversion from ‘int’ to ‘char*’ [-fpermissive]
strcat(m,d);
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/cstring:42:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:48,
from ./Main.cpp:1:
/usr/include/string.h:136:14: note: initializing argument 1 of ‘char* strcat(char*, const char*)’
extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
^
./Main.cpp:38:19: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
if(strcmp(m,y) == 0){
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/cstring:42:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:48,
from ./Main.cpp:1:
/usr/include/string.h:143:12: note: initializing argument 1 of ‘int strcmp(const char*, const char*)’
extern int strcmp (__const char *__s1, __const char *__s2)
^
./Main.cpp:43:18: error: invalid types ‘int[int]’ for array subscript
temp = m[i];
^
./Main.cpp:44:11: error: invalid types ‘int[int]’ for array subscript
m[i] = m[j];
^
./Main.cpp:44:18: error: invalid types ‘int[int]’ for array subscript
m[i] = m[j];
^
./Main.cpp:45:11: error: invalid types ‘int[int]’ for array subscript
m[j] = temp;
^
セット
テストケース