Original Post
Hi,
I have this cod "hgrd_demo":
typedef list CollGCell;
typedef CollGCell::iterator IterGCell;
.
.
.
IterGCell NextCell( HFroSeg *pseg, IterGCell& iclprv=NULL);
The code compiles fine in Debug mode, but when compiling in Release mode I get the following error:
hgrid.h(99) : error C2440: 'default argument' : cannot convert from 'int' to 'const HGrdTri::IterGCell &'
Reason: cannot convert from 'int' to 'const HGrdTri::IterGCell'
No constructor could take the source type, or constructor overload resolution was ambiguous
The line corresponding to the error is "IterGCell NextCell( HFroSeg *pseg, const IterGCell& iclprv=NULL);"
If I remove the =NULL part it sets off a bunch of other errors all concerned with either default arguments or comparisons using NULL.
If I just run in debug mode, it will get to "if ( Cell(0) != NULL)" in HGridTri::NextCell and throw an error. "Debug Assertion Failed... [filepath]\list... Line: 309... Expression: list iterators incompatable"
Ran the included demo in debug mode (without following it with breakpoints like above) and it bailed and wrote a blank trace.txt.
Any ideas?
.
.
.
inline void HGrdTri::DumpTri()
{
char sbuf[256];
sprintf( sbuf, "n0 = (%lg %lg) n1 = (%lg %lg) n2 = (%lg %lg)",
(*Node(0))->X(), (*Node(0))->Y(),
(*Node(1))->X(), (*Node(1))->Y(),
(*Node(2))->X(), (*Node(2))->Y() );
TRACE( sbuf);
void *cp0, *cp1, *cp2;
cp0 = cp1 = cp2 = NULL;
if ( Cell(0) != NULL)
cp0 = *Cell(0);
if ( Cell(1) != NULL)
cp1 = *Cell(1);
if ( Cell(2) != NULL)
cp2 = *Cell(2);
//sprintf( sbuf, "c0 = (%p %p) c1 = (%p %p) c2 = (%p %p)", Cell(0), cp0, Cell(1), cp1, Cell(2), cp2);
sprintf( sbuf, "c0 = (%p) c1 = (%p) c2 = (%p)", cp0, cp1, cp2);
TRACE( sbuf);
}
this code from site : http://www.codeproje...218#xx3995218xx
and attach code File
please answer
I have this cod "hgrd_demo":
typedef list
typedef CollGCell::iterator IterGCell;
.
.
.
IterGCell NextCell( HFroSeg *pseg, IterGCell& iclprv=NULL);
The code compiles fine in Debug mode, but when compiling in Release mode I get the following error:
hgrid.h(99) : error C2440: 'default argument' : cannot convert from 'int' to 'const HGrdTri::IterGCell &'
Reason: cannot convert from 'int' to 'const HGrdTri::IterGCell'
No constructor could take the source type, or constructor overload resolution was ambiguous
The line corresponding to the error is "IterGCell NextCell( HFroSeg *pseg, const IterGCell& iclprv=NULL);"
If I remove the =NULL part it sets off a bunch of other errors all concerned with either default arguments or comparisons using NULL.
If I just run in debug mode, it will get to "if ( Cell(0) != NULL)" in HGridTri::NextCell and throw an error. "Debug Assertion Failed... [filepath]\list... Line: 309... Expression: list iterators incompatable"
Ran the included demo in debug mode (without following it with breakpoints like above) and it bailed and wrote a blank trace.txt.
Any ideas?
.
.
.
inline void HGrdTri::DumpTri()
{
char sbuf[256];
sprintf( sbuf, "n0 = (%lg %lg) n1 = (%lg %lg) n2 = (%lg %lg)",
(*Node(0))->X(), (*Node(0))->Y(),
(*Node(1))->X(), (*Node(1))->Y(),
(*Node(2))->X(), (*Node(2))->Y() );
TRACE( sbuf);
void *cp0, *cp1, *cp2;
cp0 = cp1 = cp2 = NULL;
if ( Cell(0) != NULL)
cp0 = *Cell(0);
if ( Cell(1) != NULL)
cp1 = *Cell(1);
if ( Cell(2) != NULL)
cp2 = *Cell(2);
//sprintf( sbuf, "c0 = (%p %p) c1 = (%p %p) c2 = (%p %p)", Cell(0), cp0, Cell(1), cp1, Cell(2), cp2);
sprintf( sbuf, "c0 = (%p) c1 = (%p) c2 = (%p)", cp0, cp1, cp2);
TRACE( sbuf);
}
this code from site : http://www.codeproje...218#xx3995218xx
and attach code File
please answer