作者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