Hello,
Is there a way to initialize a 2D or 1D array to zeros all at the same time?
I have this:
However initially the arrays hold random numbers. I would like to set all of them to zero to keep the good practice of initializing everything before assigning.Code:double inputs[50][2]; double desiredOutputs[50]; int iterate = 0; while(getline(file,line)) { // code inputs[iterate][0] = x_1D; inputs[iterate][1] = c_1D; desiredOutputs[iterate] = y_1D; iterate++; }
Thank you,