Does GCC support Characterise operator?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sir,

I read from a document that there is and operator called character operator in c and it converts the operand to quoted character. I wrote the following code and tried to execute in GCC-2.95.2, but i'm getting the following error.
"`#' operator is not followed by a macro argument name"
Does it mean character operator wont work with GCC?
If this is implemented in latest version can u give me a example and the output of how it works.

Program:
#define MAKECHARACTER(operand) #@operand
int main()
{
   char ch;
   ch=97;
   switch(ch)
   {
       case MAKECHARACTER(a):
           ch='b';
           break;
       default:
           ch='x';
   }
return 0;
}

Thank you,
K.Naga Priya

##############################################################################################################################################
The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination, copying or other use of, or taking any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. If you have received this in error, please contact the sender and delete
the material from your system. Accord Software & Systems Pvt. Ltd. (ACCORD) is not responsible for any changes made to the material other
than those made by ACCORD or for the effect of the changes on the meaning of the material.
##############################################################################################################################################

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux