Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

½Ð±Ð¤@­ÓC++ªº¤p°ÝÃD..

0 views
Skip to first unread message

加油~

unread,
Feb 18, 2002, 9:29:10 AM2/18/02
to

我照著書寫了以下的class

#include <vector>

class iStack{
public:
iStack(int capacity)
:_stack(capacity),_top(0){}

bool pop(int &value);
bool push(int value);

bool full();
bool empty();
void display();

int size();

private:
int _top;
vector<int> _stack;
};

但是卻出現以下的錯誤訊息:

c:\programs\c++\jjj\jjj.h(19) : error C2143: syntax error : missing ';'
before '<'
c:\programs\c++\jjj\jjj.h(19) : error C2501: 'vector' : missing storage-class
or type specifiers
c:\programs\c++\jjj\jjj.h(19) : error C2059: syntax error : '<'
c:\programs\c++\jjj\jjj.h(19) : error C2238: unexpected token(s) preceding ';'

請問是什麼原因ㄋ..
謝謝~

--
※ 發信站: 江湖閒話(tales.twbbs.org)
◆ From: 219008.D13-219.ncu.edu.tw

0 new messages