Hi
I'm using MS Visual Studio 2005 and have made a class called "Stack_Class" whiich consist of "class.cpp" and "class.h"
when i made a c++ program and i want to use "stack_class" i added just a refrencs to the header file class.h
like this
#include <C:\Visual Studio 2005\Projects\stack\stack\Stack.h>
in the main program file(.cpp)
Then compiled my program it gives the following errors
1>Main.obj:error LNK2019: unresolved external symbol "public: __thiscall Stack_Class::~Stack_Class(void)" (??1Stack_Class@@QAE@XZ) referenced in function _main
1>Main.obj:error LNK2019: unresolved external symbol "public: int __thiscall Stack_Class::Pop_It(int *)" (?Pop_It@Stack_Class@@QAEHPAH@Z) referenced in function _main
1>Main.obj:error LNK2019: unresolved external symbol "public: int __thiscall Stack_Class::Push_It(int)" (?Push_It@Stack_Class@@QAEHH@Z) referenced in function _main
1>Main.obj:error LNK2019: unresolved external symbol "public: __thiscall Stack_Class::Stack_Class(unsigned char)" (??0Stack_Class@@QAE@E@Z) referenced in function _main
1>C:\Visual Studio 2005\Projects\Test_Stack\Debug\Test_Stack.exe : fatal error LNK1120: 4 unresolved externals
but when i added the"stack.cpp" to the main program file(.cpp)
it works fine ---->Why
when i'm use function like printf i only include the "stdio.h" without its associated .cpp file
thanks