用的是dev c++为什么多文件不可以编译呢
#include<iostream>
#include<stdlib.h>
#include"MyStack.h"
#include"Coordinate.h"
using namespace std;
/* MyStack(int size);//分配内存初始化栈空间,设定栈容量,栈顶
~MyStack(); //回收栈空间内存
bool stackEmpty();//判定栈是否为空,为空返回true,非空返回false
bool stackFull();//定栈是否满,为满返回true,不满返回false
void clearStack();//清空栈
int stackLength();//已有元素个数
void push(char elem);//元素入栈,栈顶上升
char pop(char &elem);//元素出栈,栈顶下降
void stackTraverse();//遍历栈中所有元素
*/
int main()
{
MyStack *pStack = new MyStack(5);
pStack->push(Coordinate(1,2));//底
pStack->push(Coordinate(3,4));
//pStack->push(Coordinate(5,6));
//pStack->push(Coordinate(7,8));
// pStack->push(Coordinate(9,10));
pStack->stackTraverse(true);
cout << endl;
pStack->stackTraverse(false);
cout << endl;
// pStack->clearStack();
cout << pStack->stackLength() << endl;
if(pStack->stackEmpty())
{
cout << "栈为空"<< endl;
}
if(pStack->stackFull())
{
cout <<"栈为满"<< endl;
}
delete pStack;
pStack = NULL;
system("pause");
return 0;
}
用的是dev c++为什么多文件不可以编译呢