Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > # operator

Reply
Thread Tools

# operator

 
 
xuatla
Guest
Posts: n/a
 
      01-22-2007
Hi,

Anyone know some description about # operator in C++?

I just saw this recently in the macro definition, e.g.,

#define printAsIs(letter) #letter

Now I understand that it simply converts the argument letter to a
string. But I couldn't find any reference online by myself. Any other
usage of '#' in C++ besides this?

Thanks.
- X

 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      01-22-2007
xuatla wrote:
> Anyone know some description about # operator in C++?
>
> I just saw this recently in the macro definition, e.g.,
>
> #define printAsIs(letter) #letter
>
> Now I understand that it simply converts the argument letter to a
> string. But I couldn't find any reference online by myself. Any other
> usage of '#' in C++ besides this?


No.

http://www.google.com/search?num=100...ssor+operators

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask


 
Reply With Quote
 
 
 
 
xuatla
Guest
Posts: n/a
 
      01-23-2007
Got it. Thanks!

- X

Victor Bazarov wrote:
> xuatla wrote:
> > Anyone know some description about # operator in C++?
> >
> > I just saw this recently in the macro definition, e.g.,
> >
> > #define printAsIs(letter) #letter
> >
> > Now I understand that it simply converts the argument letter to a
> > string. But I couldn't find any reference online by myself. Any other
> > usage of '#' in C++ besides this?

>
> No.
>
> http://www.google.com/search?num=100...ssor+operators
>
> V
> --
> Please remove capital 'A's when replying by e-mail
> I do not respond to top-posted replies, please don't ask


 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
T::operator int () const ambiguous with T::operator Handle () const? Tim Clacy C++ 15 05-30-2005 02:14 AM
Member operators operator>>() and operator<<() Alex Vinokur C++ 3 03-20-2005 03:11 PM
operator*(Foo) and operator*(int) const: ISO C++ says that these are ambiguous: Alex Vinokur C++ 4 11-26-2004 11:46 PM
Operator overloading on "default" operator John Smith C++ 2 10-06-2004 10:22 AM
Q: operator void* or operator bool? Jakob Bieling C++ 2 03-05-2004 04:27 PM



Advertisments