c – “不允许不完整类型”错误是什么意思?

前端之家收集整理的这篇文章主要介绍了c – “不允许不完整类型”错误是什么意思?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图在C中声明一个回调例程,如下所示:
void register_rename (int (*function) (const char *current,const char *new));
    /*------------------------------------------------------------*/
    /* WHEN:  The callback is called once each time a file is received and
     *   accepted.   (Renames the temporary file to its permanent name)
     * WHAT:  Renames a file from the given current name to the specified new name.
     */

但是,我收到以下错误

line 204: error #70: 
      incomplete type is not allowed
void register_rename (int (*function) (const char *current,const char *new));

我不知道如何纠正这个问题.我在同一个头文件中声明了其他类似的回调例程,我没有收到此错误.

请帮忙! 原文链接:https://www.f2er.com/c/117852.html

猜你在找的C&C++相关文章