🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.help
Article #4

Re: C++ - How to alter non-static, private array with a private member function?

#4
From: MW Ron
Date: Sat, 04 Nov 1995 18:29
33 lines
1816 bytes
 price@mindspring.com (Jeffery R. Price) Writes:

>I am using CW7 and am relatively new to C++. I have a class which has a
>private data member declared as:
>   int Reg[6];
>
>I have a private member function which I want to change the contents of
>Reg[6]. 

Can you show a bit of code, there appears to be a couple mistakes from
your description.
if you have a private member function you would have to call that function
from a public member ( or constructor ) in order to modify your array. 
Did you mean that the member function was public?
You say you want to change the contents of Reg[6];   If this is actually
correct you would have to create a 7 element array,   if you meant you
wanted to change the array Reg, in that case you wouldn't include the
indexes. 

If you could send me a snippet of code I will look at it and see where the
error is at.  I think you are being confused by the error message which
may have taken you off on a wild goose chase.  error messages are
something we are trying to improve all the time.

You might want to download the error message database that works with
QuickView for online help.



Ron

   METROWERKS               Ron Liechty
"Software at Work"    MWRon@metrowerks.com
Technical Details
Message-ID: <47gbe4$lu0@newsbf02.news.aol.com>
Path: arc1-ca.pugleaf.net!newsbf02.news.aol.com!not-for-mail
References: <price-0211951815560001@price.mindspring.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newsbf02.news.aol.com!not-for-mail
From: mwron@aol.com (MW Ron)
Newsgroups: comp.sys.mac.programmer.help,comp.sys.mac.programmer.codewarrior,comp.lang.c++
Subject: Re: C++ - How to alter non-static, private array with a private member function?
Date: 4 Nov 1995 13:29:24 -0500
Organization: America Online, Inc. (1-800-827-6364)
Sender: root@newsbf02.news.aol.com
Message-ID: <47gbe4$lu0@newsbf02.news.aol.com>
References: <price-0211951815560001@price.mindspring.com>
Reply-To: mwron@aol.com (MW Ron)
NNTP-Posting-Host: newsbf02.mail.aol.com