473,395 Members | 1,637 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

What is the use of namespacename::classname().function()

I am looking in some old code of someone who's gone. Why should one use
something like namespacename::classname().thefunction()? 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 1136
My4th wrote:
I am looking in some old code of someone who's gone. Why should one use
something like namespacename::classname().thefunction()? 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
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...
4
by: Jack | last post by:
Hello, What function can get a string's long by JavaScript? Thank you
5
by: W. Jack | last post by:
Hello, in VBScript: Int(11.4)=11 What function in JScript like this function? Thank you
2
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...
5
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...
3
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....
12
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...
12
by: Ziggy | last post by:
Hello, What function allows conversion md5 in text? Thanks in advance Thierry
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.