tutorial2.cpp:3:22: error: ISO C++ forbids declaration of 'GetMax' with no type [-fpermissive]
GetMax(int n, int a[])
^
tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:8:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
tutorial2.cpp: In function 'int main()':
tutorial2.cpp:13:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&z);
~~~~~^~~~~~~~~
tutorial2.cpp:14:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=0;i<z;i++) scanf("%d",&arr[i]);
~~~~~^~~~~~~~~~~~~~