2005/Aug/30

ทดสอบ:## operator

/***************************************************
* Author : o2mini
* Project : Tutorial Examples
* Creation Date : October 2004
* Description : ทดสอบการใช้งาน ## operator
***************************************************/
#include <stdio.h>
#definejoin( a, b )(a##b)

void main ( void )
{
intiResult ,ab = 1;
iResult= join( a, b );
printf ("iResult = %d\n", iResult );
}

ทดสอบ:# operator

/****************************************************
* Author : o2mini
* Project : Tutorial Examples
* Creation Date :October 2004
* Description : ทดสอบการใช้งาน # operator
***************************************************/
#include <stdio.h>
#define toString( Token ) #Token

void main( void )
{
char *myToken = "Hello";
printf("variable name = %s\n", toString( myToken ) );
printf("variable value = %s\n", myToken );
}

ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
#1  by   (202.149.25.225) At 2008-01-25 22:56, 

<< Home