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 do we use oop?

1049


What is encapsulation example?

989


What is the problem with multiple inheritance?

1104


What are the 4 pillars of oop?

1098


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2101


write knight tour problem which is present in datastructure

2606


What is polymorphism in oops with example?

981


Why polymorphism is used in oops?

1005


Why is oop better than procedural?

1033


What are the three parts of a simple empty class?

1994


What do you mean by Encapsulation?

1039


What is overriding in oops?

1063


Prepare me a program for the animation of train

2424


What is destructor oops?

1041


which feature are not hold visual basic of oop?

2152