www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/14/09:30:23

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: parameter passing
Date: Sun, 09 Nov 1997 13:25:39 -0800
Organization: Alcyone Systems
Lines: 27
Message-ID: <34662A53.73C918D2@alcyone.com>
References: <346695C9 DOT 5E0F AT cs DOT huji DOT ac DOT il>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ofer Corshid wrote:

> when I try find(t) the compiler, of course, complains about
> the type mismatch, but when I try find(*t) the compiler
> gives a linking error message (see my previous previous
> message) and when I run symify it points to ths line which
> contains this operation (find(*t))!!!!

Uh, because they're the wrong types, so if you start coercing them into
one another things are going to go wrong.

If the prototype for your function is 

    T *X::find(const H &) const;

then you'll have to pass it an object of type H, or one derived from
type H.

This is standard C++, by the way, and has nothing to do with DJGPP.

-- 
         Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                       Alcyone Systems / http://www.alcyone.com/max/
  San Jose, California, United States / icbm://+37.20.07/-121.53.38
                                     \
   "Since when can wounded eyes see / If we weren't who we were"
                                   / Joi

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019