Hello!
Sorry, it was a typo, but good to leran sth new even on it.
When I corrected it I just got error :
1 2 3 4 5 6 7 8 9 10 11 12 13 14
prog.cpp: In function ‘int* pus(int)’:
prog.cpp:7:9: warning: variable ‘max’ set but not used [-Wunused-but-set-variable]
int max;
^
prog.cpp: In function ‘int main()’:
prog.cpp:43:16: error: expected primary-expression before ‘int’
int arraypo[5]=int z[5];
^
prog.cpp:44:8: error: invalid conversion from ‘int’ to ‘int*’ [-fpermissive]
z=po(st);
^
prog.cpp:44:8: error: too few arguments to function ‘int* po(int*, int)’
prog.cpp:23:6: note: declared here
int* po(int arraypo[5], int g){
Please, show code and output where it is called only once. If you fix error with po() function, you should see that pus was called twice, unless you radically changed your code.
1) for(int i=g [b]- 1[/b];i>=0;i--){ You do not have arraypo[5] element actually
2) delete[] z; z is pointing to an array, so you have to use array delete.