What is the use of unnamed namespaces in OOPS?
The only advantage I know is that they dont need the scope
resolution operator while accessing them. I want to know
some other advantages of unnamed namespaces...
Answers were Sorted based on User's Feedback
Answer / santosh mundhe
Another advantage is that u can extend namespace within the
same file ....
E.g
#include <iostream>
using namespace std;
namespace
{
int myval;
void funct (int);
}
namespace
{
void funct (int i)
{
cout << i << endl;
}
}
int main()
{
funct(myval);
return 0;
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / c++ coder
in addition to the advantage mentioned above , there is one
more that the namespace is local to the file and one cannot
use it into another by 'using namespace' since it is
unnamed.
| Is This Answer Correct ? | 0 Yes | 0 No |
I have One image (means a group photo ) how to split the faces only from the image?............ please send the answer nagadurgaraju@gmail.com thanks in advace...
How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user.
Which type does string inherit from?
what is difference between class template and template class?
Should you protect the global data in threads? Why or why not?
explain defference between structure and class with example
What is a class in oop?
all about pointers
DIFFRENCE BETWEEN STRUCTURED PROGRAMING AND OBJCET ORIENTED PROGRAMING.
what is the difference between <stdio.h>and "stdio.h"?
What is destructor give example?
What are the components of marker interface?