相关疑难解决方法(0)

错误:没有以前的功能原型.为什么我收到此错误?

// screen.h

#ifndef screen_h
#define screen_h

#define MAC  1
#define WIN  2
#define LNX  3

#ifdef PLATFORM 
# undef PLATFORM 
#endif

#define PLATFORM MAC

void screen_init();

#endif
Run Code Online (Sandbox Code Playgroud)

// screen.c

#include <string.h>
#include <stdlib.h>

#include "screen.h"

#if PLATFORM == MAC

#include <curses.h> 

void screen_init(){
    erase();
}

#endif
Run Code Online (Sandbox Code Playgroud)

我不明白为什么它没有在screen.h中看到我的原型

任何建议/提示表示赞赏!

c prototype

29
推荐指数
1
解决办法
4万
查看次数

标签 统计

c ×1

prototype ×1