online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> int main() { double array2d[5][5]; double *ptr; ptr = array2d[0]; // initializing matrix for (int i = 0; i < 5; ++i) { for (int j = 0; j < 5; ++j) { if (j % 2 != 0) { array2d[i][j] = (i + 1) - 2.5; } else { array2d[i][j] = 2 * (i + 1) + 0.5; } } } double (*rowBegin)[5] = std::begin(array2d); double (*rowEnd)[5] = std::end(array2d); while(rowBegin != rowEnd) { double *colBegin = std::begin(rowBegin[0]); double *colEnd = std::end(rowBegin[0]); double lowestvalue = *colBegin;//for comparing elements double *pointerToMaxValue = colBegin; while(colBegin!= colEnd) { if(*colBegin > lowestvalue) { lowestvalue = *colBegin; pointerToMaxValue = colBegin ; } colBegin = colBegin + 1; } double *newcolBegin = std::begin(rowBegin[0]); double *newcolEnd = std::end(rowBegin[0]); while(newcolBegin!=newcolEnd) { if(*newcolBegin == lowestvalue) { *newcolBegin = -1; } ++newcolBegin; } ++rowBegin; } return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue