-
October 13th, 2021, 12:15 PM
#1
TRACE MACRO problem in MFC
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;
}
}
}
}
-
October 13th, 2021, 01:08 PM
#2
Re: TRACE MACRO problem in MFC
And what value did you expect to be printed with this TRACE?
Victor Nijegorodov
-
October 13th, 2021, 01:13 PM
#3
Re: TRACE MACRO problem in MFC
Originally Posted by jstoll
Code:
//for testing purposes of the tribuffer
void CCubeShapes::TestTriBuffer(CTriangleDepthBuffer* TriBuf)
{
...
{
tri = TriBuf->m_listoftriangles.GetAt(pos);
res = tri->depth;
TRACE("\ngetnext distance %lf \n"), res;
}
}
}
}
Wouldn't you like to change this to something like
Code:
{
tri = TriBuf->m_listoftriangles.GetAt(pos);
res = tri->depth;
TRACE("\ngetnext distance %lf \n", res);
}
Victor Nijegorodov
-
October 13th, 2021, 08:45 PM
#4
Re: TRACE MACRO problem in MFC
thank you sir, definitly a typographic error was the problem,i didn't even notice it i'm suprised it even compiled that way
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|