prog.cpp:3:20: error: ‘vector’ has not been declared
int coinChange(vector<int>& coins, int amount) {
^~~~~~
prog.cpp:3:26: error: expected ‘,’ or ‘...’ before ‘<’ token
int coinChange(vector<int>& coins, int amount) {
^
prog.cpp: In member function ‘int Solution::coinChange(int)’:
prog.cpp:5:27: error: ‘amount’ was not declared in this scope
int *dp = new int[amount+1];
^~~~~~
prog.cpp:10:21: error: ‘INT_MAX’ was not declared in this scope
int x = INT_MAX;
^~~~~~~
prog.cpp:10:21: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?
prog.cpp:1:1:
+#include <climits>
class Solution {
prog.cpp:10:21:
int x = INT_MAX;
^~~~~~~
prog.cpp:11:27: error: ‘coins’ was not declared in this scope
for(int j=0;j<coins.size();j++){
^~~~~
prog.cpp:17:21: error: ‘min’ was not declared in this scope
x = min(dp[i-coins[j]], x); // dp[7-1], dp[7-3], dp[4], dp[0]
^~~
prog.cpp:30:26: error: ‘INT_MAX’ was not declared in this scope
if(dp[amount] == INT_MAX){
^~~~~~~
prog.cpp:30:26: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’?