<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
Erez D wrote:
<blockquote
cite="mid:6c32b540904280135n13bdf6c5neb224b04ba232e91@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
<br>
<div class="gmail_quote">
<div><br>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr" bgcolor="#ffffff" text="#000000"><br>
Try to have gen_c2 return a pointer to c2<int>. That may resolve
the problem.<br>
</div>
</blockquote>
<div>no, it doesnt.<br>
<br>
i am sure that there is a solution to this.<br>
</div>
</div>
</div>
</blockquote>
Try to have gen_c2 return a pointer to c2<int>, and place the
actual function body definition after the definition of c2.<br>
<br>
If that fails, have gen_c2 return a pointer to c1<int>. As
c1<int> is a public parent of c2<int>, it should amount to
almost the same thing.<br>
<br>
In any case, having a child function return a copy of a parent class is
bad OO design.<br>
<br>
Shachar<br>
<pre class="moz-signature" cols="72">--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a class="moz-txt-link-freetext" href="http://www.lingnu.com">http://www.lingnu.com</a>
</pre>
</body>
</html>