Errors on Linux Machine (but not on my pc) when compiling

Is there a definitive answer to these problems? or should i post all my code? want to avoid doing that due to homework assignment


No errors when I compile on windows 7 system, but when i jump into our linux test server (which is how we are tested) i get the following errors:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
HashT.cpp: In constructor âHashT::HashT()â:
HashT.cpp:9: error: cannot convert âHashT::Node**â to âHashT::Node*â in assignment
HashT.cpp:13: error: no match for âoperator=â in â*(((HashT*)this)->HashT::myHashTable + ((HashT::Node*)(((unsigned int)i) * 1032u))) = (HashT::Node*)operator new(1032u)â
HashT.h:17: note: candidates are: HashT::Node& HashT::Node::operator=(const HashT::Node&)
HashT.cpp:14: error: base operand of â->â has non-pointer type âHashT::Nodeâ
HashT.cpp: In constructor âHashT::HashT(int)â:
HashT.cpp:22: error: cannot convert âint*â to âHashT::Node*â in assignment
HashT.cpp:26: error: no match for âoperator=â in â*(((HashT*)this)->HashT::myHashTable + ((HashT::Node*)(((unsigned int)i) * 1032u))) = (HashT::Node*)operator new(1032u)â
HashT.h:17: note: candidates are: HashT::Node& HashT::Node::operator=(const HashT::Node&)
HashT.cpp:27: error: base operand of â->â has non-pointer type âHashT::Nodeâ
HashT.cpp: In member function âvoid HashT::hashtable_add(char*, int)â:
HashT.cpp:50: error: âkeyâ was not declared in this scope
HashT.cpp:59: error: incompatible types in assignment of âchar*â to âchar [1024]â
HashT.cpp:69: error: incompatible types in assignment of âchar*â to âchar [1024]â
HashT.cpp: In member function âvoid HashT::hashtable_display()â:
HashT.cpp:81: error: cannot convert âHashT::Nodeâ to âHashT::Node*â in assignment
HashT.cpp:86: error: âcoutâ was not declared in this scope
HashT.cpp:86: error: âendlâ was not declared in this scope
HashT.cpp:89: error: base operand of â->â has non-pointer type âHashT::Nodeâ
make: *** [HashT.o] Error 1

Last edited on
Hi

What kind of character is that "â" ? You cant use alphabet characters other than english, only English alphabet characters can be used!
Last edited on
I'm not using any different characters, thats the problem... lol no idea where that symbol is coming from?
not sure for the weird errors, but i had a typo in the header file.. all fixed now
Topic archived. No new replies allowed.