Submission #511140

# Submission time Handle Problem Language Result Execution time Memory
511140 2022-01-15T08:54:35 Z Salama 짝수 정렬 (tutorial3) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include <grader.h>
using namespace std;
int z[100000];
void q2(int x,int *q){ int d=0; for(int o=0;o<x;o++){ if(q[o]%2==0){z[d]=q[o]; d++;}} sort(z,z+d); for(int o=0;o<d;o++)Report z[o];
     
} 

Compilation message

tutorial3.cpp: In function 'void q2(int, int*)':
tutorial3.cpp:5:126: error: expected ';' before 'z'
    5 | void q2(int x,int *q){ int d=0; for(int o=0;o<x;o++){ if(q[o]%2==0){z[d]=q[o]; d++;}} sort(z,z+d); for(int o=0;o<d;o++)Report z[o];
      |                                                                                                                              ^~
      |                                                                                                                              ;
tutorial3.cpp:5:120: warning: statement is a reference, not call, to function 'Report' [-Waddress]
    5 | void q2(int x,int *q){ int d=0; for(int o=0;o<x;o++){ if(q[o]%2==0){z[d]=q[o]; d++;}} sort(z,z+d); for(int o=0;o<d;o++)Report z[o];
      |                                                                                                                        ^~~~~~
tutorial3.cpp:5:120: warning: statement has no effect [-Wunused-value]