Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem with IHTMLInputElement Pin
prasad_som19-Oct-06 23:18
prasad_som19-Oct-06 23:18 
AnswerRe: Problem with IHTMLInputElement Pin
Hamid_RT20-Oct-06 0:06
Hamid_RT20-Oct-06 0:06 
QuestionOLEDATA.MSO Format Pin
Reuven Nisser19-Oct-06 22:56
Reuven Nisser19-Oct-06 22:56 
QuestionPush-like checkboxes in WinXP Pin
Kiomuto19-Oct-06 22:47
Kiomuto19-Oct-06 22:47 
AnswerRe: Push-like checkboxes in WinXP Pin
Hamid_RT20-Oct-06 7:12
Hamid_RT20-Oct-06 7:12 
GeneralRe: Push-like checkboxes in WinXP Pin
Kiomuto21-Oct-06 5:51
Kiomuto21-Oct-06 5:51 
Questionreturning const member data Pin
minkowski19-Oct-06 22:41
minkowski19-Oct-06 22:41 
AnswerRe: returning const member data Pin
Cedric Moonen19-Oct-06 23:00
Cedric Moonen19-Oct-06 23:00 
minkowski wrote:
But I was messing around with it and I am able to modify the const return value .


Because you probably copied the return of the function into a local non-const variable. Something like this:

const int Fun()<br />
{<br />
   return 10;<br />
}<br />
<br />
int main()<br />
{<br />
  int Temp = Fun();<br />
  Temp++;<br />
}


It is perfectly legal because you don't modify the return value of the function but you modify a copy of it (which is non-const).


Cédric Moonen
Software developer

Charting control [Updated - v1.1]

GeneralRe: returning const member data Pin
minkowski19-Oct-06 23:01
minkowski19-Oct-06 23:01 
GeneralRe: returning const member data Pin
Cedric Moonen19-Oct-06 23:12
Cedric Moonen19-Oct-06 23:12 
AnswerRe: returning const member data Pin
prasad_som19-Oct-06 23:06
prasad_som19-Oct-06 23:06 
GeneralRe: returning const member data Pin
minkowski19-Oct-06 23:16
minkowski19-Oct-06 23:16 
QuestionBitmap Printing Pin
kk.tvm19-Oct-06 22:37
kk.tvm19-Oct-06 22:37 
AnswerRe: Bitmap Printing Pin
Hamid_RT20-Oct-06 0:06
Hamid_RT20-Oct-06 0:06 
QuestionMDI Childs Pin
baerten19-Oct-06 22:28
baerten19-Oct-06 22:28 
QuestionRe: MDI Childs Pin
prasad_som20-Oct-06 0:08
prasad_som20-Oct-06 0:08 
QuestionRe: MDI Childs [modified] Pin
baerten20-Oct-06 1:08
baerten20-Oct-06 1:08 
Questionmemory leaks using pdh library Pin
m.dietz19-Oct-06 21:48
m.dietz19-Oct-06 21:48 
Questionhow to... Pin
Bravoone_200619-Oct-06 21:01
Bravoone_200619-Oct-06 21:01 
AnswerRe: how to... Pin
Hamid_RT20-Oct-06 0:09
Hamid_RT20-Oct-06 0:09 
AnswerRe: how to... Pin
David Crow20-Oct-06 3:35
David Crow20-Oct-06 3:35 
QuestionWaitForSingleObject Pin
LiYS19-Oct-06 20:20
LiYS19-Oct-06 20:20 
AnswerRe: WaitForSingleObject Pin
Cedric Moonen19-Oct-06 20:38
Cedric Moonen19-Oct-06 20:38 
GeneralRe: WaitForSingleObject Pin
LiYS19-Oct-06 20:52
LiYS19-Oct-06 20:52 
GeneralRe: WaitForSingleObject Pin
Cedric Moonen19-Oct-06 20:59
Cedric Moonen19-Oct-06 20: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.