Hello All,
I have never ever thought about this, till recently I cam across a
book (COM/DCOM Primer)
where ':' is referred to as the scope resolution operator used in the
following context:
class Derived : public Base {
....
Now, '::' is what I know of as the scope resolution operator. This
leads me to ask:
[1] Is ':' at all an operator when used in the above context,
[2] If so, does it have a proper name such as colon operator?
[3] Is it correct to refer to it as the scope resolution opeator?
[4] What does the standard say?
Regards,
Suman 3 2707
On Mar 21, 12:58 am, "Suman" <skar...@gmail.comwrote:
Hello All,
I have never ever thought about this, till recently I cam across a
book (COM/DCOM Primer)
where ':' is referred to as the scope resolution operator used in the
following context:
class Derived : public Base {
...
Now, '::' is what I know of as the scope resolution operator. This
leads me to ask:
[1] Is ':' at all an operator when used in the above context,
[2] If so, does it have a proper name such as colon operator?
[3] Is it correct to refer to it as the scope resolution opeator?
[4] What does the standard say?
"::" is the scope resolution operator. The colon in question is just
part of the syntax of the base-clause, it has no specific name that
I'm aware of. ro***********@yahoo.com wrote:
On Mar 21, 12:58 am, "Suman" <skar...@gmail.comwrote:
>Hello All,
I have never ever thought about this, till recently I cam across a book (COM/DCOM Primer) where ':' is referred to as the scope resolution operator used in the following context:
class Derived : public Base { ...
Now, '::' is what I know of as the scope resolution operator. This leads me to ask: [1] Is ':' at all an operator when used in the above context, [2] If so, does it have a proper name such as colon operator? [3] Is it correct to refer to it as the scope resolution opeator? [4] What does the standard say?
"::" is the scope resolution operator. The colon in question is just
part of the syntax of the base-clause, it has no specific name that
I'm aware of.
It is also used in label specifiers for goto and swich case statements.
The standard does not appear to give it any name but it appears in the
syntactic definitions of these things.
On Mar 21, 9:37 pm, Noah Roberts <u...@example.netwrote:
robertwess...@yahoo.com wrote:
On Mar 21, 12:58 am, "Suman" <skar...@gmail.comwrote:
Hello All,
I have never ever thought about this, till recently I cam across a
book (COM/DCOM Primer)
where ':' is referred to as the scope resolution operator used in the
following context:
[...]
"::" is the scope resolution operator. The colon in question is just
part of the syntax of the base-clause, it has no specific name that
I'm aware of.
It is also used in label specifiers for goto and swich case statements.
The standard does not appear to give it any name but it appears in the
syntactic definitions of these things.
And to begin initializer lists.
Thanks a lot for your replies.
Regards,
Suman This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Paul Davis |
last post by:
I'd like to overload 'comma' to define a concatenation operator for
integer-like classes. I've got some first ideas, but I'd appreciate a
sanity check. The concatenation operator needs to so...
|
by: joesoap |
last post by:
Hi can anybody please tell me what is wrong with my ostream operator???
this is the output i get using the 3 attached files.
this is the output after i run assignment2
-joesoap
#include...
|
by: Jason |
last post by:
Hello. I am trying to learn how operator overloading works so I wrote
a simple class to help me practice. I understand the basic opertoar
overload like + - / *, but when I try to overload more...
|
by: Martin Magnusson |
last post by:
I have defined a number of custom stream buffers with corresponding in
and out streams for IO operations in my program, such as IO::output,
IO::warning and IO::debug. Now, the debug stream should...
|
by: Sensei |
last post by:
Hi.
I have a problem with a C++ code I can't resolve, or better, I can't see
what the problem should be!
Here's an excerpt of the incriminated code:
=== bspalgo.cpp
// THAT'S THE BAD...
|
by: YUY0x7 |
last post by:
Hi, I am having a bit of trouble with a specialization of operator<<.
Here goes:
class MyStream
{
};
template <typename T>
MyStream& operator<<(MyStream& lhs, T const &)
|
by: gugdias |
last post by:
I'm coding a simple matrix class, which is resulting in the following
error when compiling with g++ 3.4.2 (mingw-special):
* declaration of `operator/' as non-function
* expected `;' before '<'...
|
by: raylopez99 |
last post by:
I need an example of a managed overloaded assignment operator for a
reference class, so I can equate two classes A1 and A2, say called
ARefClass, in this manner: A1=A2;. For some strange reason...
|
by: valerij |
last post by:
Yes, hi
How to write "operator +" and "operator =" functions in a class with
a defined constructor? The following code demonstrates that I don't
really understand how to do it... I think it has...
|
by: y-man |
last post by:
Hi,
I am trying to get an overloaded operator to work inside the class it
works on. The situation is something like this:
main.cc:
#include "object.hh"
#include "somefile.hh"
object obj,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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,...
| |