Click here to Skip to main content
15,881,871 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: overzealous protection rules Pin
Dave Kerr12-Jul-06 5:08
Dave Kerr12-Jul-06 5:08 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 5:29
Dave Schumann12-Jul-06 5:29 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 5:04
Dave Schumann12-Jul-06 5:04 
AnswerRe: overzealous protection rules Pin
Maximilien12-Jul-06 4:59
Maximilien12-Jul-06 4:59 
AnswerRe: overzealous protection rules Pin
David Crow12-Jul-06 5:10
David Crow12-Jul-06 5:10 
GeneralRe: overzealous protection rules Pin
toxcct12-Jul-06 5:06
toxcct12-Jul-06 5:06 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 5:17
Dave Schumann12-Jul-06 5:17 
GeneralRe: overzealous protection rules Pin
David Crow12-Jul-06 5:27
David Crow12-Jul-06 5:27 
Dave Schumann wrote:
No it's not.


Sure it is.

Dave Schumann wrote:
Changing these to "classes" with public: at the beginning has no effect (I've tried it)


It won't have an effect until you put A::value into a public section. This is the default with a struct. So, you'll either need:

struct A
{
    A* partner;
 
    void doodah()
    { ++partner->value; } //this is legal
    int value; 
};
or

class A
{
public:
    A* partner;
 
    void doodah()
    { ++partner->value; } //this is legal
    int value;
};



"The largest fire starts but with the smallest spark." - David Crow

"Judge not by the eye but by the heart." - Native American Proverb


GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 5:33
Dave Schumann12-Jul-06 5:33 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 5:50
Zac Howland12-Jul-06 5:50 
GeneralRe: overzealous protection rules Pin
toxcct12-Jul-06 6:38
toxcct12-Jul-06 6:38 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 7:05
Zac Howland12-Jul-06 7:05 
QuestionRe: overzealous protection rules Pin
David Crow12-Jul-06 6:30
David Crow12-Jul-06 6:30 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 5:07
Dave Schumann12-Jul-06 5:07 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 6:09
Zac Howland12-Jul-06 6:09 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:15
Dave Schumann12-Jul-06 6:15 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 6:25
Zac Howland12-Jul-06 6:25 
GeneralRe: overzealous protection rules [modified] Pin
Dave Schumann12-Jul-06 6:48
Dave Schumann12-Jul-06 6:48 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 7:05
Zac Howland12-Jul-06 7:05 
AnswerRe: overzealous protection rules Pin
Zac Howland12-Jul-06 5:45
Zac Howland12-Jul-06 5:45 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:00
Dave Schumann12-Jul-06 6:00 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 6:21
Zac Howland12-Jul-06 6:21 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:50
Dave Schumann12-Jul-06 6:50 
GeneralRe: overzealous protection rules Pin
Zac Howland12-Jul-06 7:08
Zac Howland12-Jul-06 7:08 
GeneralRe: overzealous protection rules Pin
Dave Schumann12-Jul-06 6:59
Dave Schumann12-Jul-06 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.