473,804 Members | 3,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is the use of namespacename:: classname().fun ction()

I am looking in some old code of someone who's gone. Why should one use
something like namespacename:: classname().the function()? He repeatedly does
that.

The function is virtual and not static. If you create a temporary
namespacename:: classname() class to call thefunction(), at least that is
what I understand of it, then would it not be more sense to make thefunction
static? What the use of making thefunction virtual if you already decide
which function you call, for the temp class you use?
Jul 23 '05 #1
2 1147
My4th wrote:
I am looking in some old code of someone who's gone. Why should one use
something like namespacename:: classname().the function()? He repeatedly
does that.

The function is virtual and not static. If you create a temporary
namespacename:: classname() class to call thefunction(), at least that is
what I understand of it, then would it not be more sense to make
thefunction static?
Only if calling it on temporaries is the only useful way of calling it.
What the use of making thefunction virtual if you already decide which
function you call, for the temp class you use?


Again, it depends on wether the temporary is the only way the function could
ever be used.
Jul 23 '05 #2

"Rolf Magnus" <ra******@t-online.de> schreef
Only if calling it on temporaries is the only useful way of calling it.


ok! I am stuying this code before I can say whether or not its used in other
contekstes also.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
1722
by: Jonas Kölker | last post by:
Hello. I'm doing a Rubik's Cube timer, so I need a function to measure 100ths of a second. I've browsed through the library reference of python.org, but I didn't find anything that struck me as 'the perfect fit'. Either it was system dependent, or it was too grainy (lo-res), or... something else. so, I need a function which satisfies (in order of importance): 1. It can be used to measure time in the range of up to approximately 1
4
2030
by: Jack | last post by:
Hello, What function can get a string's long by JavaScript? Thank you
5
8894
by: W. Jack | last post by:
Hello, in VBScript: Int(11.4)=11 What function in JScript like this function? Thank you
2
1362
by: Fred Bassett | last post by:
For example, a database with three tables: EMPLOYEE(employee#, empName, empAddress, empTel) EMPLOYEE_ON_PROJECT(employee#, project#) PROJECT(project#, projectStartDate, projectEndDate) What sort of query would i have to run (or SQL would I have to type) to return something like "A list of employee names for all of the employees that are assigned to more than 2 projects (In the EMPLOYEE_ON_PROJECT)"? I've been toying with 'COUNT' but...
5
61225
by: dubing | last post by:
Hello everyone, There is a field of DATETIME type in our Access 2000 database. PHP is used to query the data and display the query results on the web. Does Access provide any function that can convert DATETIME field into a more user friendly format directly in query? I can do the following in MySQL. How should it be done in Access? SELECT DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y');
3
4874
by: ashok | last post by:
Hi, I need a function that will divide text from mysql in 2 parts, so that I can display first half in one column and second half in second column. I can't find what function will do this job. Here is part of what I have. $myrow = mysql_fetch_assoc($rsindexpage); //function wordcount $wc = str_word_count($myrow); $half = ($wc/2);
12
1714
by: salonowiec | last post by:
My very basic code is: <?php $fname='alpha.ext'; readfile($fname); ?> Only when ext is txt I'm getting a reasonable content, otherwise there's a lot of bush. What function should I use to open doc, xls, pdf, gif?... Can you help to a supernewbie???
12
5221
by: Ziggy | last post by:
Hello, What function allows conversion md5 in text? Thanks in advance Thierry
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9143
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.