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...
Answer Posted / 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 |
Post New Answer View All Answers
What is the use of oops?
Why do while loop is used?
What is the real time example of inheritance?
What is abstraction in oops?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
What is this pointer in oop?
Where You Can Use Interface in your Project
Whats is abstraction in oops?
What is the highest level of cohesion?
What is encapsulation in oops?
How do you define a class in oop?
How many human genes are polymorphic?
What is the difference between inheritance and polymorphism?
What does and I oop mean in text?
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...