Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why it is called runtime polymorphism?

1146


What are properties in oop?

1098


What are two types of polymorphism?

1080


What is difference between oop and pop?

1178


What is abstraction in oops?

1052


What does and I oop mean in text?

1236


Can static class have constructor?

1039


when to use 'mutable' keyword and when to use 'const cast' in c++

2165


Can we override main method?

1211


what is different between oops and c++

2557


Why multiple inheritance is not allowed?

1168


What is abstraction oop?

1105


What is the diamond problem in inheritance?

1147


Can we create object of interface?

1141


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1644