Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Is ':' an operator?

Reply
Thread Tools

Is ':' an operator?

 
 
Suman
Guest
Posts: n/a
 
      03-21-2007
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

 
Reply With Quote
 
 
 
 
robertwessel2@yahoo.com
Guest
Posts: n/a
 
      03-21-2007
On Mar 21, 12:58 am, "Suman" <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
 
 
 
Noah Roberts
Guest
Posts: n/a
 
      03-21-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> On Mar 21, 12:58 am, "Suman" <(E-Mail Removed)> wrote:
>> 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.
 
Reply With Quote
 
Suman
Guest
Posts: n/a
 
      03-23-2007
On Mar 21, 9:37 pm, Noah Roberts <(E-Mail Removed)> wrote:
> (E-Mail Removed) wrote:
> > On Mar 21, 12:58 am, "Suman" <(E-Mail Removed)> wrote:
> >> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments