This page was last updated on March 13th, 2020(UTC) and it is currently September 19th, 2021(UTC).
That means this page is 1 years, 190 days, 5 hours, 34 minutes and 59 seconds old. Please keep that in mind.

36 - Function Overloading In an attempt to squash the ever persistant issue (at least, this is my hypothesis, anyway) of name clashing (things with the same name but aren't even remotely the same), they came up with a feature that almost nobody uses called "namespaces." It's actually quite useful, but even I forget about it when I actually need it. May you not fall victim to the same fate if you choose to use C++. #include <stdio.h> //------------------------------------------------------------------------ namespace cat { void kitty(){ printf("meow!\n"); } } //------------------------------------------------------------------------ namespace cat2 { void kitty(){ printf("meow meow!\n"); } } //------------------------------------------------------------------------ extern "C" void meow(){ using namespace cat2; cat::kitty(); kitty(); }

Get your own web kitty here!
┬ęCopyright 2010-2021. All rights reserved.