追逐理想
如果你了解我,你就会喜欢我
1.    #define VaParameter_Macro(...) 
       编译环境: VC6.0
       编译错误:  error C2010: '.' : unexpected in macro formal parameter list
        原因:   据查是因为VC6.0不支持可变参数的宏定义,VC6.0编译不能通过
 
 

2. ****.cpp 文件中有如下函数:

 

void skf_drawText(Skf_Char* pcText, Skf_S16 x, Skf_S16 y, screenRectSt rect, colourSt colorst, Skf_S32 flag, Skf_U16 font, unsigned    char  **p) 

其中: 

struct screenRectSt ;

struct colourSt 自定义数据结构

 

通过gdb调试,进入skf_drawText, 所有的数据均为非法数据,无法进行调试,但print的数据均为正常,有效数据

如下所示:

 

  通过尝试用如下定义,则调试过程一切正常。

  void skf_drawText(Skf_Char* pcText, Skf_S16 x, Skf_S16 y, mr_screenRectSt* rect, mr_colourSt* colorst, Skf_S32 flag, Skf_U16 font,    unsigned char  **p) 

结论: 函数定义,实现过程中,参数尽量采用指针或者基本数据类型,提高效率同时 方便gdb 进行调试 

 

 

 

posted on 2012-03-07 17:58  人间奇迹  阅读(4423)  评论(0编辑  收藏  举报