This page was last updated on March 13th, 2020(UTC) and it is currently May 31st, 2020(UTC).
That means this page is 78 days, 19 hours, 29 minutes and 46 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-2020. All rights reserved.