I am getting sick with this error, function Redefinition !!! .
I am building a log file, So that i can keep track of my program memroy allocation and deallocation,
to get rid of memory leaks.For that i have build a function template in a Namespace. What i am doing is that , i will pass
Object to this function, the object could be of any type, and getting information about that Object.
void LogInit(const char* logName = NULL)
//Doing Something with logName
void MemLog( T* mVar )
// Doing something with mVar
Now when i include this MemTrack.h in one file it is fine
MemTracker::MemLog(this); //Working fine , no error
But when i include this MemTrack.h file in another file(s) it give me error given below
error LNK2005: "void __cdecl MemTracker::LogInit(char const *)" (?LogInit@MemTracker@@YAXPBD@Z) already defined in
PLease help me , and tell me how could i able to get access this function in multiple files.
..... Thanks in advance
with best regards