Submission #14878

#TimeUsernameProblemLanguageResultExecution timeMemory
14878kyma123최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include <iostream> using namespace std; int main() { int a, m, n; cin >> n; for(; n--;) { cin >> a; a = a > m ? a : m; } cout << m; }

Compilation message (stderr)

tutorial2.cpp: In function ‘int main()’:
tutorial2.cpp:11:12: warning: ‘m’ is used uninitialized in this function [-Wuninitialized]
   cout << m;
            ^
/tmp/ccPjQTnc.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccFiTflE.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccFiTflE.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `GetMax(int, int*)'
collect2: error: ld returned 1 exit status