|
先看代码:
- [color="Blue"]typedef void *SMIQ;[/color]
- bool smi_receive_getaddr( SMIQ *sqp, void **addr);
- struct my_msg *msg;
- ...
- smi_rcceive_getaddr(sqp, (void **)&msg);
- typedef struct {
- ...
- } SMIQ_FIFO;
- bool smi_close_fifo(SMIQ *sqp)
- {
- [color="Blue"] SMIQ_FIFO *p = (SMIQ_FIFO *)sqp; //二级指针转换为一级指针?[/color]
- ...
- }
复制代码
为什么要把二级指针转换为一级指针呢?
有什么特殊的用途? |
|