Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #12005
| From | Victor Bazarov <v.bazarov@comcast.invalid> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: C++ puzzle - how to get this to compile ? |
| Date | 2011-12-01 13:52 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <jb8icj$86t$1@dont-email.me> (permalink) |
| References | <1e5dd913-1403-42b9-bcc1-527ee7a31dbb@p2g2000vbj.googlegroups.com> <Xns9FAEC7120FD5Dmyfirstnameosapriee@216.196.109.131> |
On 12/1/2011 12:34 PM, Paavo Helde wrote:
> OSS542<jhart666@gmail.com> wrote in news:1e5dd913-1403-42b9-bcc1-
> 527ee7a31dbb@p2g2000vbj.googlegroups.com:
>
>> How might one go about getting something like the following example to
>> compile successfully ?
>>
>> class cls2
>> {
>> friend void cls1::fun1();
>> };
>> class cls1
>> {
>> cls2 mbr1;
>> public:
>> void fun1();
>> };
>>
>
> class cls2
> {
> // This function may only be called from class cls1!
> void fun_for_cls1();
> };
> class cls1
> {
> cls2 mbr1;
> public:
> void fun1() {
> mbr1.fun_for_cls1();
'cls1::fun_for_cls1' is private in this context.
> }
>
> };
V
--
I do not respond to top-posted replies, please don't ask
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
C++ puzzle - how to get this to compile ? OSS542 <jhart666@gmail.com> - 2011-11-30 16:24 -0800
Re: C++ puzzle - how to get this to compile ? Bart v Ingen Schenau <bart@ingen.ddns.info> - 2011-12-01 13:54 +0100
Re: C++ puzzle - how to get this to compile ? OSS542 <jhart666@gmail.com> - 2011-12-06 13:08 -0800
Re: C++ puzzle - how to get this to compile ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-12-01 11:34 -0600
Re: C++ puzzle - how to get this to compile ? Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-01 13:52 -0500
Re: C++ puzzle - how to get this to compile ? Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-01 13:53 -0500
Re: C++ puzzle - how to get this to compile ? Paavo Helde <myfirstname@osa.pri.ee> - 2011-12-01 16:03 -0600
Re: C++ puzzle - how to get this to compile ? Juha Nieminen <nospam@thanks.invalid> - 2011-12-02 06:28 +0000
Re: C++ puzzle - how to get this to compile ? Victor Bazarov <v.bazarov@comcast.invalid> - 2011-12-02 11:12 -0500
Re: C++ puzzle - how to get this to compile ? Juha Nieminen <nospam@thanks.invalid> - 2011-12-02 16:36 +0000
csiph-web