[問題] error: cannot allocate an object of...
現在在cirGate.h裡面寫member function
readCircuit 已經寫完了 compile也可以過
但不知道位何剛剛compile就出現這行:
cirMgr.cpp:258: error: cannot allocate an object of abstract type ‘CirAigGate
’cirGate.h:193: note: because the following virtual functions are pure
within ‘CirAigGate’:cirGate.h:45: note: virtual CirGate*
CirGate::getFin0() constcirGate.h:46: note: virtual bool
CirGate::get_0inv() constcirGate.h:47: note: virtual bool
CirGate::get_1inv() const
CirAigGate是繼承CirGate
是因為我在寫AIG的member function的時候改到了什麼嗎?
因為我確定沒動到cirMgr.cpp 和 .h
那三個virtual func本來都好好的,都沒有error 也可以用
本來我這三個func不是virtual 是CirAigGate才有的mem func
做用是在return自己的private data member
但後來我把他們三個在cirGate變成virtual func
我確定其他繼承的gate都定義過這三個virtual func了 只是裡面是空的
是這個原因嗎??位什麼??
感謝解答
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.4.181
※ 編輯: meanid 來自: 140.112.4.181 (12/24 18:13)
推
12/24 19:36, , 1F
12/24 19:36, 1F
推
12/24 23:13, , 2F
12/24 23:13, 2F
推
12/24 23:15, , 3F
12/24 23:15, 3F
→
12/24 23:15, , 4F
12/24 23:15, 4F
→
12/24 23:16, , 5F
12/24 23:16, 5F