Inline Nested Namespace in C++
This video tutorial explains about the inline nested namespace in c++ programming.
You are gonna learn what is an inline nested namespace, how to define a inline namespace, how to access the members of an inline namespace , what is the use of inline namespace in detail with example.
source code for this tutorial
#include <iostream>
using namespace std;
namespace AppVersion{
namespace version1{
void display(){
cout <<"display function from the version 1"<<endl;
}
}
namespace version2{
void display(){
cout<< "display function from the version 2"<<endl;
}
}
inline namespace version3{
void display(){
cout<< "display function from the version 3"<<endl;
}
}
namespace version3{
void whatsUp(){
cout<< "whatsup function from the version 3"<<endl;
}
}
}
int main()
{
AppVersion :: display();
AppVersion :: whatsUp();
return 0;
}