I want to initialize a 2D array with -1 as all the value. I used memset() for this.
memset()
#include using namespace std; int dp[100]
You can't use memset in the global scope. It must be written in main scope.
#include using namespace std; int dp[100][100]; int main() { memset(dp, -1, sizeof(dp)); cout<