Click here to Skip to main content
15,028,757 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: Adding Text to the Frame Of a Dialog Pin
David Crow10-Aug-16 5:41
MemberDavid Crow10-Aug-16 5:41 
GeneralRe: Adding Text to the Frame Of a Dialog Pin
leon de boer10-Aug-16 17:07
Memberleon de boer10-Aug-16 17:07 
GeneralRe: Adding Text to the Frame Of a Dialog Pin
ForNow10-Aug-16 20:31
MemberForNow10-Aug-16 20:31 
GeneralRe: Adding Text to the Frame Of a Dialog Pin
leon de boer11-Aug-16 3:00
Memberleon de boer11-Aug-16 3:00 
GeneralRe: Adding Text to the Frame Of a Dialog Pin
ForNow11-Aug-16 3:18
MemberForNow11-Aug-16 3:18 
GeneralRe: Adding Text to the Frame Of a Dialog Pin
ForNow11-Aug-16 2:58
MemberForNow11-Aug-16 2:58 
AnswerRe: Adding Text to the Frame Of a Dialog Pin
Richard MacCutchan9-Aug-16 20:49
mveRichard MacCutchan9-Aug-16 20:49 
Questionconst "getter" but updating on request? Pin
FriendOfAsherah8-Aug-16 21:20
MemberFriendOfAsherah8-Aug-16 21:20 
Looking for an idea solving following problem:
I have a "get()" function which returns the condition of an object stored in a member variable.
There is also some code that updates this _cond
int getCond() const { return _cond; }
void UpdateCond() { ... etc ... _cond=f(); ... }

In the whole code getCond() and UpdateCond() called are independetly, so that a "const" function could call "getCond()"

But there is one silly stupid use of the getCond() where the Update() is done in the getCond() code
So the former old coder maybe thought "update on request!"
int getCond() { UpdateCond(); return _cond; }

because UpdateCond() changes the member _cond getCond() cannot be const anymore.

Anyone an idea to overcome this problem?
(if not I have to change back this crunchy design into non-const getCond() functions...
There are about 100 in derived classes ...
AnswerRe: const "getter" but updating on request? Pin
Jochen Arndt8-Aug-16 23:46
professionalJochen Arndt8-Aug-16 23:46 
GeneralRe: const "getter" but updating on request? Pin
FriendOfAsherah9-Aug-16 2:30
MemberFriendOfAsherah9-Aug-16 2:30 
GeneralRe: const "getter" but updating on request? Pin
Jochen Arndt9-Aug-16 3:03
professionalJochen Arndt9-Aug-16 3:03 
QuestionGrowing Pains Going from Debug to Release Pin
ForNow8-Aug-16 9:19
MemberForNow8-Aug-16 9:19 
AnswerRe: Growing Pains Going from Debug to Release Pin
CPallini8-Aug-16 20:31
mveCPallini8-Aug-16 20:31 
GeneralRe: Growing Pains Going from Debug to Release Pin
ForNow8-Aug-16 21:15
MemberForNow8-Aug-16 21:15 
QuestionC programming Pin
Kofi_Tommy7-Aug-16 8:16
MemberKofi_Tommy7-Aug-16 8:16 
QuestionRe: C programming Pin
David Crow7-Aug-16 10:38
MemberDavid Crow7-Aug-16 10:38 
QuestionRe: C programming Pin
Paul Conrad13-Aug-16 18:09
professionalPaul Conrad13-Aug-16 18:09 
AnswerRe: C programming Pin
Kofi_Tommy17-Aug-16 10:04
MemberKofi_Tommy17-Aug-16 10:04 
QuestionMigrating old project to VS2008 - resource file errors Pin
charlieg4-Aug-16 3:10
Membercharlieg4-Aug-16 3:10 
AnswerRe: Migrating old project to VS2008 - resource file errors Pin
Richard MacCutchan4-Aug-16 3:36
mveRichard MacCutchan4-Aug-16 3:36 
GeneralRe: Migrating old project to VS2008 - resource file errors Pin
charlieg4-Aug-16 8:07
Membercharlieg4-Aug-16 8:07 
GeneralRe: Migrating old project to VS2008 - resource file errors Pin
Richard MacCutchan4-Aug-16 8:22
mveRichard MacCutchan4-Aug-16 8:22 
GeneralRe: Migrating old project to VS2008 - resource file errors Pin
leon de boer7-Aug-16 7:47
Memberleon de boer7-Aug-16 7:47 
GeneralRe: Migrating old project to VS2008 - resource file errors Pin
charlieg8-Aug-16 2:02
Membercharlieg8-Aug-16 2:02 
GeneralRe: Migrating old project to VS2008 - resource file errors Pin
leon de boer8-Aug-16 7:11
Memberleon de boer8-Aug-16 7:11 

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.