제출 #243458

#제출 시각아이디문제언어결과실행 시간메모리
243458prarie최댓값 (tutorial2)C++14
컴파일 에러
0 ms0 KiB

int GetMax(int N, int *A){
	int ans = a[0];
	for (int i = 1; i < N; i++) {
		if (ans < a[i]) ans = a[i];
	}
	return ans;
}

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

tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:3:12: error: 'a' was not declared in this scope
  int ans = a[0];
            ^