C
CQ
Hi everyone,
I get the following error when compiling my code:
error: invalid initialization of non-const reference of type 'Vertex&'
from a temporary of type 'int'
The implementation of the function is as follows:
Vertex& IGEdge::Mate (Vertex const& vertex) {
if (v0 == vertex) {
return v1;
} else {
return 0;
}
}
What do you suggest to do? And why can't I return a simple
NULL-Pointer? All I want to do is to return a NULL in case my vertex v0
does not match the vertex being passed as a parameter.
Thanks a lot in advance,
CQ.
I get the following error when compiling my code:
error: invalid initialization of non-const reference of type 'Vertex&'
from a temporary of type 'int'
The implementation of the function is as follows:
Vertex& IGEdge::Mate (Vertex const& vertex) {
if (v0 == vertex) {
return v1;
} else {
return 0;
}
}
What do you suggest to do? And why can't I return a simple
NULL-Pointer? All I want to do is to return a NULL in case my vertex v0
does not match the vertex being passed as a parameter.
Thanks a lot in advance,
CQ.