answersLogoWhite

0

Is a public function accessed like a non-member function?

Updated: 8/21/2019
User Avatar

Wiki User

7y ago

Best Answer

A public function is scoped to the class in which it is declared. If declared non-static, then it must be invoked against an instance of the class but if declared static then namespace resolution is required to access the function.

A non-member function is not scoped to any class but may be scoped to a namespace. If no namespace is specified, then it is scoped to the (unnamed) global namespace. If scoped to any other namespace then namespace resolution is required to access the function.

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is a public function accessed like a non-member function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you dig up items like armour and weapons in the runescape nonmember wilderness?

no


What is the cutetest animal in animal jam?

Well it depends what you think is cute. There is ALOT to choose from like if you are a nonmember like the seal,wolf,panada,monkey,tiger,koala, and the bunny. But if you are a member you can get a horse,croc,doliphin,shark, turtle,rhino,and a elephant with the nonmember animals too.


How can nonmember RuneScape players get a cat?

never heard of a runescape cat. well im a nonmember and ive been almost everywhere a nonmember can be exept for like deep inside the karamja volcano that stuff. so, i dont think so U only can get a cat from members and pass the Gegertate's cat ( quest ) P.S I don't know how to spell the quest :) What about the random event where bob the cat turns evil, leaves u on the island scaperune, and you have to escape HUH?? By the way ive been everywhere in the nonmember world. Ever been to Melzar's maze? How about the island of Crandor?


How static member function main in java can be accessed by another function?

The main method can be called just like any other method. Just keep in mind that doing so can create infinite loops. Example: class MyClass { static boolean hasEnteredMain = false; public static void main(String[] args) { System.out.println("main()"); if(hasEnteredMain) { return; } hasEnteredMain = true; f(); } static void f() { System.out.println("f()"); main(null); } }


Who uses Yosemite national park?

Anybody can "use" Yosemite National Park and explore its great beauty. It is a public park and can be accessed by vehicle for $20 or can be accessed via hike-in trails for free (like the John Muir trail). PArk rangers, local residents, and vacationers are some examples of the people welcome to the park.


What is public setting meaning?

Public setting refers to a physical or virtual space that is accessible to and used by the general population. It can include places like parks, libraries, schools, or public transportation where people gather or interact with one another. These settings are typically open to everyone and serve a public function.


Why the main function is public and static?

The main function is public because it means it needs to be called by any object. I had to check this myself but if you try to make the main function in Java private it will give you a run time error. It is static because it is indicating it is a class method and it does not need to be instantiated. Without the static keyword you would need to do something like this Main main = new Main();


How do you access private variable in flex?

In Flex, you access a private variable by calling it from within that class. Remember, the "private" modifier means it cannot be directly accessed outside of the class you declare it in (note I say "directly accessed" you can indirectly access it via public functions which I will show below). Example: declare your variable at the top of your class like this: private var myVariable:String; Then, inside one of your functions of that class, you can access the variable and/or assign it this way: public function changeMyVariable(value:String):void { // sets the private variable to a custom string myVariable="test String"; trace("myVariable is set to "+myVariable); // sets the private variable to the argument passed in myVariable = value; trace("myVariable is now set to" +myVariable); }


Does any one have a free member account?

On Clubpenguin, there are no FREE member accounts. There are free non-member accounts though. But if your a nonmember then you don't get to do certain things like decorate your igloo, own all of the puffles, buy clothing and equipment and even enter some rooms in clubpenguin parties. Personally, being a member on clubpenguin is really fun, but being a nonmember is sometimes fun too!


How do you get a rare moshling when youre a nonmember?

You can get eggs like from main street and from ds games like in moshling zoo you get nipper in the case and you can get furnando in the moshling theme park case as well and if you do not have them games type in how to get nipper and furnando on youtube by Andy.


How do you get the current time in Microsoft Excel?

You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()You use the NOW function, like this:=NOW()


Where can television be found?

Television can be found in homes, hotels, restaurants, airports, and public places like waiting rooms and lobbies. It can also be accessed through streaming services and online platforms.