连字符,double pound
来源:互联网 发布:东方中原电子白板软件 编辑:程序博客网 时间:2024/05/16 08:17
逻辑上能解决,多写点代码也是可以理解的。只有不断的学习进步才能把生僻变为不生僻。
注意这样的写法:
//================
#define FUNCTION( arg ) Hello##arg##world
typedef void (*FunctionPoint)( char* parg );
FunctionPoint g_FunctionPoint;
void Hello_world( char* pS )
{
strcpy( pS, "Hello, world!\n" );
return;
}
int main(int argc, _TCHAR* argv[])
{
// get function point
g_FunctionPoint = FUNCTION(_);
char sS[ 128 ];
g_FunctionPoint( sS );
printf( sS );
getchar();
return 0;
}
//================
OUTPUT:
Hello,world!
//================
## 代表的是连字符,double pound。不过现在不太常使用。
即
g_FunctionPoint = FUNCTION(_);
展开后是:
g_FunctionPoint = Hello_world;
进行了函数指针的赋值。
注意这样的写法:
//================
#define FUNCTION( arg ) Hello##arg##world
typedef void (*FunctionPoint)( char* parg );
FunctionPoint g_FunctionPoint;
void Hello_world( char* pS )
{
strcpy( pS, "Hello, world!\n" );
return;
}
int main(int argc, _TCHAR* argv[])
{
// get function point
g_FunctionPoint = FUNCTION(_);
char sS[ 128 ];
g_FunctionPoint( sS );
printf( sS );
getchar();
return 0;
}
//================
OUTPUT:
Hello,world!
//================
## 代表的是连字符,double pound。不过现在不太常使用。
即
g_FunctionPoint = FUNCTION(_);
展开后是:
g_FunctionPoint = Hello_world;
进行了函数指针的赋值。
- 连字符,double pound
- JavaScript中的连字符
- Java中的连字符
- 特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
- 特殊字符url编码以后再解码后出现错误(¬ , ¢, ¤, £)
- Yii URL 连字符管理
- 大小写转换,去除连字符
- double转换成字符型
- 20171127 float double字符大小
- 插件40:Pound代码
- CentOS下 Pound 安装
- 负载均衡之【pound】
- java各种数据库直连字符
- 【vim】交换连个字符位置
- 语料处理中连字符的处理
- latex中连字符、波折号和负号
- 英文段落每行末尾加连字符
- 字符与Double,int相互转换!!!!
- 博弈题集
- Android学习笔记(五)常用控件中
- TICK 与 CLOCK CYCLE 的区别
- 一路走来
- Argus (P2051)
- 连字符,double pound
- Android学习笔记(五)常用控件下
- 关于SSH整合使用MyEclipse自动导入包导致包冲突问题(cglib asm)
- 联机
- VC获取屏幕上任意点位置的颜色
- Android学习笔记(五)常用控件下
- gpu破解软件
- windows txt/pdf 在Ubuntu中显示乱码
- B/S项目阶段小总结