~~~ 아래와 같은 오류가 뜹니다. 도와주세요 ㅠ
submission.c: In function ‘main’:
submission.c:4:2: error: initialization makes integer from pointer without a cast
char W[100]={NULL};
^
submission.c:4:2: error: (near initialization for ‘W[0]’)
submission.c:13:17: error: comparison between pointer and integer
while( W[i*2] != NULL ){
^
submission.c:18:19: error: comparison between pointer and integer
while( W[i*2+1] != NULL ){
^
submission.c:7:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
submission.c:10:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", W);
^
개파
~~~ 아래와 같은 오류가 뜹니다. 도와주세요 ㅠ
submission.c: In function ‘main’:
submission.c:4:2: error: initialization makes integer from pointer without a cast
char W[100]={NULL};
^
submission.c:4:2: error: (near initialization for ‘W[0]’)
submission.c:13:17: error: comparison between pointer and integer
while( W[i*2] != NULL ){
^
submission.c:18:19: error: comparison between pointer and integer
while( W[i*2+1] != NULL ){
^
submission.c:7:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
submission.c:10:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%s", W);
^
9년 전