Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
c++functor
#include<iostream> class Func { public: void operator()(int num) { std::cout<< "Num: " << num << std::endl; } }; struct Bar { void operator()() { std::cout << "Bar" << std::endl; } }; int main() { Func foo; foo(5); Func()(5); Bar()(); return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Visual Studio expand modified
du
MyCodeWindows
Hangman
bool behaviour (convertion/promotion) for logical and artihmetic operators
Policy class partial specialization inheritance
#21
Computing the factorial of an integer using factorial and iteration
PTaHHHa
Computing factorial of an integer with recursion and iteration [EDIT]
Please log in to post a comment.