cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/10/21:23:22

Message-ID: <3787F116.2470F0E6@vetec.com>
Date: Sat, 10 Jul 1999 20:19:18 -0500
From: Andy Goth <andygoth AT vetec DOT com>
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: const class& as a parameter.
References: <3787A70E DOT 190417A AT unb DOT ca>
Reply-To: djgpp AT delorie DOT com

>     I have some class "foo":
> class foo {...};
> 
> And I have some function bar:
> void bar(const foo& foo2)
> {
>  foo2.member();
> }

It seems that foo::member() is not const.
 
>     This generates a "warning: passing `const foo' as `this' argument of `void
> foo::member()' discards const".

By the way, did anyone get my plea for help?
  ___  _   _ ____  _   _
 / _ \| \ | |  _ \\ \_/ / .--------[ ICQ#: 35256413 ]--------.
| |_| |  \| | | | |\   /  | 01001000011001010110110001101100 |
|  _  | \ \ | | | | | |   | 01101111001011000010000001110111 |
| | | | |\  | |_| | | |   | 01101111011100100110110001100100 |
|_| |_|_| \_|____/  |_|   `--[ mailto:andygoth AT vetec DOT com ]---'
<http://zap.to/andygoth/>           <http://andygoth.cjb.net/>

- Raw text -


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