0_0_24675957_17240.cpp: In function 'int main()':
0_0_24675957_17240.cpp:36:24: error: size of array 'dp' has non-integral type 'int*'
int dp[n+1][w+1];
^
0_0_24675957_17240.cpp:38:31: error: invalid conversion from 'int*' to 'int' [-fpermissive]
int min_j=f_min(w,w[n]);
^
0_0_24675957_17240.cpp:13:5: note: initializing argument 1 of 'int f_min(int, int)'
int f_min(int a,int b)
^
0_0_24675957_17240.cpp:43:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
for(int j=min_j;j<=w;j++)
^
0_0_24675957_17240.cpp:49:35: error: invalid conversion from 'int*' to 'int' [-fpermissive]
int min_j=f_min(w,w[i]);
^
0_0_24675957_17240.cpp:13:5: note: initializing argument 1 of 'int f_min(int, int)'
int f_min(int a,int b)
^
0_0_24675957_17240.cpp:54:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
for(int j=min_j;j<=w;j++)
^
0_0_24675957_17240.cpp:65:30: error: invalid types 'int [1][int [(n + 1)]]' for array subscript
printf("%d\n",dp[1][w]);
^
|