online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <initializer_list> template <typename T = float> class Matrix { public: int m_rows; int m_columns; T* m_ptr; Matrix(std::initializer_list<T> list) { m_rows = list.size(); m_ptr = new T[m_rows]; int i = 0; for(auto elements : list){ std::cout << "This is elem " << elements << std::endl; *(m_ptr + i) = elements; i++; } } ~Matrix() { delete[] m_ptr; } }; int main() { Matrix<int> m({1, 2 ,4}); 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