Hi there. I recently had to create my own container class for a project, however I am having some trouble in getting it to work and would be grateful for any help.
This is my code, the problem I am having is that recently when trying to compile I have been getting the following error:
error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
I am quite new to C++, though I didn't think this was a beginner problem so I put it here. Any help would be greatly appreciated, but how do I get rid of this error?
Every console program needs to have the function: int main() defined somewhere. That is where we start the program. Without that function, our program won't go anywhere. You need to add that function if you want to run this as an executable.
It's also possible that you are writing a library or DLL. In that case you won't need int main(). The executable that calls your DLL will have the int main().