Hi,
I have a general utility header file utility.h, in which I have defined a debug routine
void debug(int debugLevel, const char * debugDesc, const char * debugStr)
I have two more files a.cpp(a.h) and b.cpp (b.h),when I call the debug routine from inside a.cpp(int main) it works fine however if I call some function in b.cpp from a.cpp and call the debug routine from inside that function in b.cpp, I don't see any debug output, though the program compiles fine and is getting all the variables correctly.
b.cpp
Appreciate if anybody can help me in this.
Thanks,
Tewari
I have a general utility header file utility.h, in which I have defined a debug routine
void debug(int debugLevel, const char * debugDesc, const char * debugStr)
I have two more files a.cpp(a.h) and b.cpp (b.h),when I call the debug routine from inside a.cpp(int main) it works fine however if I call some function in b.cpp from a.cpp and call the debug routine from inside that function in b.cpp, I don't see any debug output, though the program compiles fine and is getting all the variables correctly.
Code:
a.cpp
int main(int argv, char * argc[]) {
//create utility Object
utility utilityObj;
utilityObj.debug(1, "U R here", ""); -----> works fine
utilityObj.debug(1, "Creating LogMsg object in main()", "LogMsg logmsg");
LogMsg logmsg;
logmsg.updateDatabase(To,From, getDateTime) ----> function in b.cpp
}
Code:
void LogMsg::updateDatabase(string To, string From, string getDateTime)
{
//create utility Object
utility utilityObj
utilityObj.debug(1, "you are inside logmsg routine", ""); ---> this call to debug routine does not give any output
}
Thanks,
Tewari