dishes.cpp: In function 'long int dp(const unsigned int&, const unsigned int&, const short int&)':
dishes.cpp:35:23: error: increment of read-only reference 'posa'
return max(dp(++posa, posb,1),dp(posa,++posb,-1));
^~~~
dishes.cpp:35:47: error: increment of read-only reference 'posb'
return max(dp(++posa, posb,1),dp(posa,++posb,-1));
^~~~
dishes.cpp:55:22: error: increment of read-only reference 'posa'
return max(dp(++posa, posb,1),dp(posa,++posb,-1));
^~~~
dishes.cpp:55:46: error: increment of read-only reference 'posb'
return max(dp(++posa, posb,1),dp(posa,++posb,-1));
^~~~
dishes.cpp: In function 'int main()':
dishes.cpp:72:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0;i< N;i++){
~^~~
dishes.cpp:78:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0;i< M;i++){
~^~~
dishes.cpp: In function 'long int dp(const unsigned int&, const unsigned int&, const short int&)':
dishes.cpp:63:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^