Contact: aviboots(AT)netvision.net.il
39,950 questions
51,892 answers
573 users
#include <iostream> void f(int a = -1) { std::cout << a << std::endl; } int main() { f(); f(30); } /* run: -1 30 */
#include <iostream> #include <string> void f(std::string country = "No Country") { std::cout << country << std::endl; } int main() { f(); f("USA"); f("Canada"); } /* run: No Country USA Canada */