online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> namespace A{ void print(){ std::cout<<"A::print() called"<<std::endl; } void run(){ std::cout<<"A::run() called"<<std::endl; } } namespace B{ void print(){ std::cout<<"B::print() called"<<std::endl; } void run(){ std::cout<<"B::run() called"<<std::endl; } } //-------------vvvvvvvvvvvvvvv-------->function2 has a parameter named print that is a pointer to a function taking no parameters and with return type of void void function2(void (*print)()) { print(); } int main(){//void main() changed to int main() function2(A::print); function2(A::run); function2(B::print); function2(B::run); }

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