Click here to Skip to main content
15,886,639 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Can't figure out this error... Pin
Naveen6-Jul-08 20:36
Naveen6-Jul-08 20:36 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 20:49
AndreFratelli6-Jul-08 20:49 
GeneralRe: Can't figure out this error... Pin
BadKarma6-Jul-08 20:57
BadKarma6-Jul-08 20:57 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 21:11
AndreFratelli6-Jul-08 21:11 
GeneralRe: Can't figure out this error... Pin
BadKarma6-Jul-08 21:41
BadKarma6-Jul-08 21:41 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 22:28
AndreFratelli6-Jul-08 22:28 
GeneralRe: Can't figure out this error... Pin
BadKarma6-Jul-08 22:40
BadKarma6-Jul-08 22:40 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 22:58
AndreFratelli6-Jul-08 22:58 
It works! Big Grin | :-D You were right, the function is const.

Just two things I don't get, though:

1) Why does the iterator must be constant too?
2) Why do you say that making the function not const is not good? I'm asking this because I've seen different opinions in this matter. On one hand, they would argue that making a function const allows the compiler to optimize the function in several ways. On the other hand, I remember reading an article that said that "marking a function const is only a guarantee you're giving to the user that the method will not change the class's attributes" (nor its input, I think...). What do you think?

Regards

Fratelli

GeneralRe: Can't figure out this error... Pin
BadKarma6-Jul-08 23:18
BadKarma6-Jul-08 23:18 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 23:21
AndreFratelli6-Jul-08 23:21 
GeneralRe: Can't figure out this error... Pin
BadKarma6-Jul-08 23:25
BadKarma6-Jul-08 23:25 
AnswerRe: Can't figure out this error... Pin
Nibu babu thomas6-Jul-08 20:53
Nibu babu thomas6-Jul-08 20:53 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 21:17
AndreFratelli6-Jul-08 21:17 
GeneralRe: Can't figure out this error... Pin
Nibu babu thomas6-Jul-08 21:40
Nibu babu thomas6-Jul-08 21:40 
GeneralRe: Can't figure out this error... Pin
AndreFratelli6-Jul-08 22:23
AndreFratelli6-Jul-08 22:23 
GeneralRe: Can't figure out this error... Pin
Nibu babu thomas6-Jul-08 22:26
Nibu babu thomas6-Jul-08 22:26 
QuestionC++ Classes (problem with events) Pin
marcio k6-Jul-08 20:10
marcio k6-Jul-08 20:10 
AnswerRe: C++ Classes (problem with events) Pin
andersod26-Jul-08 22:14
andersod26-Jul-08 22:14 
GeneralRe: C++ Classes (problem with events) Pin
Varghese Paul M6-Jul-08 22:55
Varghese Paul M6-Jul-08 22:55 
AnswerRe: C++ Classes (problem with events) Pin
KarstenK6-Jul-08 22:54
mveKarstenK6-Jul-08 22:54 
QuestionAbout batch file Pin
Nandu_77b6-Jul-08 19:15
Nandu_77b6-Jul-08 19:15 
AnswerRe: About batch file Pin
Rajesh R Subramanian6-Jul-08 20:03
professionalRajesh R Subramanian6-Jul-08 20:03 
QuestionRe: About batch file Pin
Nandu_77b6-Jul-08 21:19
Nandu_77b6-Jul-08 21:19 
QuestionRe: About batch file Pin
Rajesh R Subramanian6-Jul-08 21:31
professionalRajesh R Subramanian6-Jul-08 21:31 
QuestionRe: About batch file Pin
Nandu_77b6-Jul-08 22:10
Nandu_77b6-Jul-08 22:10 

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.