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

請問一個VC++的問題

1 view
Skip to first unread message

嗯嗯...

unread,
Aug 27, 1997, 3:00:00 AM8/27/97
to

【 在 hurr...@bbs.cis.nctu.edu.tw (嗨,妳好!!) 的大作中提到: 】
: //Attributes
: public:
: =====> CBackupDoc* GetDocument();
: 結果build時,在箭頭所指處產生三個error message
: error C2501 : 'CBackupDoc":missing decl-specifiers
: error C2143 : syntax error:missing ';'before '*'
: error C2501 : 'GetDocument':missing decl-specifiers

我也是有這樣的問題,但是我確定我有加入 #include <xxxDoc.h>
本來都還好好的,但是為了要測試 split window,所以除了原來的
OldView以外,又多加入一個新的 NewView,所以就要在 MainFrame
裡面加上 #include <NewView.h> 和 #include <OldView.h>。但是
一加上 #include <OldView.h> 以後,就出現了如上的 error,錯
誤出在 COldView 裡面的 OnPaint 的 GetDocument() 這個函式。
但是如果把 #include <OldView.h> 拿掉的話,又會出現:

error C2653: 'COldView' : is not a class or namespace name
error C2065: 'classCOldView' : undeclared identifier
error C2664: 'CreateView' : cannot convert parameter 3 from 'int *' to 'struct CRuntimeClass *'

這個 error 是出現在:
splitter.CreateView(0, 0, RUNTIME_CLASS(COldView),
CSize(100, 400), pContext) ;

快煩死了,拜託高手幫幫忙了,謝謝,感激不盡。

--
[37me-mail : [32mt5...@alpha.en.tit.edu.tw | david...@dds.com.tw [37;40m [0m
[37mICQ : [31;1m2888156

[m [1;35m※ 來源:‧臺北科技大學紅樓資訊站 redbbs.cc.tit.edu.tw‧[FROM: ppp72_08.cc.tit] [m

0 new messages