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

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

但是,我收到以下错误

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

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

请帮忙!

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