指针有问题。我想使用一个文件中的函数,但是有一个问题我无法解决。
这是主文件:
#include <iomanip>
#include <iostream>
#include "ilgas_skaicius.h"
#include "stekas.h"
using namespace std;
int main(){
stackType pile;
int a = Create(&pile); // problem is over here. Undefined reference.
return 0;
}
这是头文件:
#ifndef STEKAS_H_INCLUDED
#define STEKAS_H_INCLUDED
typedef struct LinkElem stackValue;
typedef struct LinkElem* stackPointer;
typedef struct StackStruct stackType;
typedef int myType;
struct StackStruct
{
stackPointer end1;
};
int Create(stackType* stack1);
int Delete (stackType* stack1);
int isFull (stackType* stack1);
int isEmpty (stackType* stack1);
int Push (myType value, stackType* stack1);
int Pop(stackType* stack1, myType* value);
#endif
我该怎么办?