I'm able to see the data via watch list and cursor over var but unable to print the data via TRACE using specifiers %lf or any other specifiers
the results keep showing 0.000000
I even set the var to a local var and it still only shows 0.000000
all the numerical data I use through out my program is doubles

Code:
//for testing purposes of the tribuffer
void CCubeShapes::TestTriBuffer(CTriangleDepthBuffer* TriBuf)
{
	//TRACE("\naddress of tribuf: %i\n"), TriBuf;
	POSITION pos = NULL;
	CTriangle* tri = NULL;
	double res;
	if (!TriBuf->m_listoftriangles.IsEmpty())
	{
		if (pos = TriBuf->m_listoftriangles.GetHeadPosition())
		{
			tri = TriBuf->m_listoftriangles.GetAt(pos);
			TRACE("\nheadpos distance %lf \n"), res=tri->depth;
		}
		while (pos)
		{
			TriBuf->m_listoftriangles.GetNext(pos);
			if (pos)
			{				
				tri = TriBuf->m_listoftriangles.GetAt(pos);
				res = tri->depth;
				TRACE("\ngetnext distance %lf \n"), res;
			}
		}

	}
}