Namespace is a function which is used to differentiate between two functions or classes that has function with the same name. Namespace start with keyword "namespace" just like class keyword . After this we give namespace a name and define it scope . whenever we want to access a desire functions (same name) we just reference it namespace and then give the function name.
Source Code
#include<iostream> using namespace std; namespace st_namespace { void LEP () { cout<<" LEP Provide you world best platform to learn Programming. You Can Visit us at \n \n "; } } namespace nd_namespace { void LEP () { cout<<" \t \t \t www.ancodingpoint.com \n"; } } int main () { st_namespace::LEP(); nd_namespace::LEP(); }
This site is full of 'great' {tab} {tab} {tab} programming. There, perfect spacing (on my screen anyway).
ReplyDeleteHeh. All the good languages have string formatting/padding. I remember some of my first programs looking like that, but nowadays it is inexcusable. Not to mention the weird use of namespaces for no real reason.
The page crashed for me on android with the cpu getting hot. Seems legit.
ReplyDelete