C++ examples for Function:Function Parameter
Functions with Empty Parameter Lists
#include <iostream> void function1(); void function2(void); int main(int argc, const char *argv[]) { function1();// w w w .j av a 2 s .com function2(); return 0; } void function1() { std::cout << "function1 takes no arguments" << std::endl; } void function2(void) { std::cout << "function2 also takes no arguments" << std::endl; }