제출 #145778

#제출 시각아이디문제언어결과실행 시간메모리
145778xxxxorb0221최댓값 (tutorial2)C++14
컴파일 에러
0 ms0 KiB
#include<cstdio>
#include<algorithm>
using namespace std;
int Getmax(int N,int[] A){
  int ans=A[0];
  for(int i=0;i<N;i++)
    ans=max(ans,A[i]);
  return ans;
}

컴파일 시 표준 에러 (stderr) 메시지

tutorial2.cpp:4:24: error: expected ',' or '...' before 'A'
 int Getmax(int N,int[] A){
                        ^
tutorial2.cpp: In function 'int Getmax(int, int*)':
tutorial2.cpp:5:11: error: 'A' was not declared in this scope
   int ans=A[0];
           ^