该程序应该保存几个点,并根据要求将它们放出.该程序包含一个.h文件和两个.c文件.这是我得到的编译器信息:
prog.c:46:25:致命错误:pointstack.h:没有这样的文件或目录#include"pointstack.h"
我错过了什么?
//File: pointStack.h - Headerfile
#ifndef POINTSTACK_H
#define POINTSTACK_H
#include <stdio.h>
#include <stdlib.h>
//structs
//struct for coordinates
struct point
{
float rX;
float rY;
float rZ;
};
typedef struct point POINT;
struct stackPoint
{
POINT p;
struct stackPoint *next;
};
typedef struct stackPoint STACK_POINT;
typedef STACK_POINT *STACK_POINT_PTR;
//functions
void push(POINT pushPoint);
POINT pop();
int isEmpty();
void printStackElement(POINT aPoint);
#endif
Run Code Online (Sandbox Code Playgroud)
//File: pointstack.c - functions of stack program
#include "pointstack.h"
//global variable
STACK_POINT_PTR stackTop = NULL;
void push(POINT pushPoint)
{ …Run Code Online (Sandbox Code Playgroud) c ×1