Original Post
Hi, I want to learn how to debug better and I was reading about assert. So does anybody know when to use this. For example im programming C++ .net, win32 app. assert(m_hInst = GetModuleHandle(NULL)); would this be a case to use it. I know it should never error, but thats what I read about using assert, use it on things that should always work. Or should I just use an if statment. m_hInst = GetModuleHandle(NULL); if(m_hInst == NULL){ return error; } Is this what assert is used for or is it for things that are simple like assert(dayInMonth <= 31) or something?