Oct 23, 2013 at 6:34am UTC
In your header, you need to write std::string.
Oct 23, 2013 at 6:59am UTC
tried what both of you suggested but now I'm getting
(1) >MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
(2)...Debug\Hash Tables.exe : fatal error LNK1120: 1 unresolved externals
also wouldn't writing on my header wouldn't that take care of writing std::, either way I wrote with and without using namespace std; and still got the same errors using namespace std;
Im writing it on visual studio 2010 btw, not sure if
Oct 23, 2013 at 7:02am UTC
How did you create your project? It looks like you picked some kind of CRT console app setting or something when you were making it (considering the reference to crtexe.obj and ___tmainCRTStartup). Try copying your code into an empty project and then building.
Oct 23, 2013 at 7:08am UTC
I followed a hash table tutorial on youtube everything is the same other than im not using netbean IDE but vs2010 but Im going to copy the code into a new project and see what happens
started new a project and received the same errors
Last edited on
Oct 23, 2013 at 7:14am UTC
Oct 23, 2013 at 7:24am UTC
Or, alternatively, just configure your project properly.
If you're using VC++, navigate to Project>Properties>Linker>System>SubSystem
EDIT* your problem is on line 8, mate.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #include <iostream>
using namespace std;
index = hashObj.Hashes( "ShinAngel");
cout << "index = " << index << endl;
Last edited on
Oct 23, 2013 at 7:26am UTC
Oct 23, 2013 at 7:35am UTC
Thank you!!! It was drving me nuts. Can't believe I missed that! and line 7 too, using namespace std; should have been before the hash header