CÖкê#ºÍ##µÄÔËÓÃ
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <malloc.h>
#define f(a,b) a##b
#define g(a) #a
#define h(a) g(a)
int main()
{
char a = 'a';
printf("%s\n",g(a)); // a
printf("%s\n",g(g(a))); // g(a)
printf("%s\n", h(f(1,2))); // 12
printf("%s\n", g(f(1,2))); // f(1,2)
printf("%s\n", g(h(f(1,2)))); // h(f(1,2))
printf("%s\n", h(g(f(1,2)))); // "f(1,2)"
printf("%s\n", h(h(f(1,2)))); // "12"
return 0;
}
Ïà¹ØÎĵµ£º
×òÌì²Å¿´µ½£¬µ«ÊÇÓöµ½Ò»Ð©ÎÊÌ⣬½ñÌì½â¾öÁË£¬¼ÇÏ¡¡£¨²Î¿¼£ºhttp://netbeans.org/kb/55/beginning-jni-part1.html£©
ÎÒÓõÄÊÇNetbeans 6.7£¬µ«ÊÇºÍÆäËûµÄÒ²Ó¦¸Ã´óͬСÒì°É¡£ »ù±¾Á÷³Ì£º JavaÕâ±ßµÄ£º
´´½¨javaÎļþ£¨´ønativeµÄ£©£¬»¹Òª¼ÇµÃÔÚÀàÖмÓÈ룺System.loadLibrary(xxx) ¡£
È»ºóÓÃjavahÀ´Éú³ÉC/ ......
ÊÔÌâ1£ºÇëдһ¸öCº¯Êý£¬Èô´¦ÀíÆ÷ÊÇBig_endianµÄ£¬Ôò·µ»Ø0£»ÈôÊÇLittle_endianµÄ£¬Ôò·µ»Ø1
½â´ð£º
int checkCPU( )
{
{
union w
{
&n ......
//ÒÔϳÌÐòÊÇʵÏÖСдת´óд³ÌÐò
#include<stdio.h>
void to_upper(char *str)
{
for(;*str !='\0';str++)
{
if(unsigned(*str-'a')<='z'-'a')
*str-='a'-'A';//Ð ......
¸ù±¾ÔÒòÔÚÓë×óÖµºÍÓÒÖµ
char a[10]=“hello”;
sizeof(a);//Êý×éÃû×ö×óÖµ£¬¾ßÓÐÊý×éÃûµÄÊôÐÔ£¬ÊÇÒ»¸öÖ¸ÏòÊý×éÊ×µØÖ·µÄ³£Á¿Ö¸Õë
strcpy(a,"abc");//Êý×éÃû×öÓÒÖµ£¬ÍË»¯ÎªÆÕͨµÄÖ¸Õë
ÔÎÄÁ´½Ó£º
http://hi.baidu.com/%D2%C0%BD%A3%D0%F9/blog/item/7bbf36966c92f36a54fb9663.html
×÷ÕߣºËᦻª e ......
6.1 ±àдһ¸ö³ÌÐò,´´½¨Ò»¸ö¾ßÓÐ26¸öÔªËØµÄÊý×é,²¢ÔÚÆäÖд洢26¸öСд×Öĸ,²¢ÈøóÌÐòÏÔʾ¸ÃÊý×éµÄÄÚÈÝ.
#include <stdio.h>
int main(void)
{
char a[26] = {'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p ......