作者fu3mo6 (ㄚ龐)
看板EE_DSnP
標題[問題] 關於hash的問題
時間Sun Jan 16 17:34:57 2011
我把myhash.h大略寫好後,想說先寫strash試試看
但是請問教授要怎麼把hash用在cirfraig.cpp裡面?
無論我宣告hash* 還是 hash,在global variable或是strash function裡
compiler一直argue,一會說lvalue不合法
一會要我在神奇的地方加括弧(ex.expected ";" before "<")
一會說"unqualified-id"等等
有template扯入真的很麻煩= =
我想說先前vector也有發生類似的事情,原因是我忘了include<vector>
因此就include "myhash.h",但是沒什麼用
又爬文看到在include檔案的時候要改makefile什麼的,就加了
但make時說"NO rule to make target "myhash.h", needed by ".extheader.mak""
rm之後在make clean在make好像沒有用...
---------------------------------------以下是心情
感覺寫完cirread和cirp,cirg的一些老師口中"硬做"的東西之後
整個就陷入恐慌="=因為剩下的都沒有什麼頭緒
板上的討論大多也似懂非懂
hash不能動,能先寫stimulate嗎?
(fraig就留給板上神人寫吧...)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.227.91.141
1F:推 ric2k1:1. Make sure "util/Makefile" 裏頭的 EXTHRDS 有把 myHash 01/16 17:38
2F:→ ric2k1:加入. 2. rm -f src/util/.extheader.mak. 3. make clean 01/16 17:39
3F:→ ric2k1:4. make 這些都做了應該就可以了吧!? 01/16 17:39
4F:推 ric2k1:我是覺得 strash 先寫, 再來寫 simulate 比較好... 01/16 17:40
5F:→ fu3mo6:有,這三步我都做過了 01/16 17:54
6F:推 ric2k1:那在 include 裏頭有 myHash.h 的 symbolic link 嗎? 01/16 18:24
7F:推 ric2k1:在不行的話請把 error message 寄給我看一下! 01/16 19:27
8F:推 tomap41017:我不論用最新版的或較舊版的檔案都不用作上面的 01/16 19:53
9F:→ tomap41017:有試過直接拿最新版的檔案來compile嗎? 01/16 19:54
10F:→ fu3mo6:我去吃個晚餐他就好了...我寫了寫在make一次就又不行了... 01/16 21:06
11F:→ fu3mo6:error: lvalue required as left operand of assignment 01/16 21:07
12F:→ fu3mo6:越make越多error是怎樣O_O request for member XXX in hash 01/16 21:16
13F:→ fu3mo6:which is of non-class type 'Hash<XXX,XXX>' 01/16 21:16
14F:推 ric2k1:tar 起來寄過來我看一下吧... 01/16 21:17
15F:→ fu3mo6:有強者我同學替我解決了!!謝謝他:D 01/16 21:41