Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Best way of breaking from for loop Pin
Roger Stoltz27-Nov-08 4:52
Roger Stoltz27-Nov-08 4:52 
AnswerRe: Best way of breaking from for loop Pin
Paul Conrad27-Nov-08 6:01
professionalPaul Conrad27-Nov-08 6:01 
AnswerRe: Best way of breaking from for loop Pin
CPallini27-Nov-08 7:32
mveCPallini27-Nov-08 7:32 
JokeRe: Best way of breaking from for loop Pin
killabyte28-Nov-08 0:30
killabyte28-Nov-08 0:30 
GeneralRe: Best way of breaking from for loop Pin
CPallini28-Nov-08 0:59
mveCPallini28-Nov-08 0:59 
AnswerRe: Best way of breaking from for loop Pin
sheshidar27-Nov-08 19:31
sheshidar27-Nov-08 19:31 
GeneralRe: Best way of breaking from for loop Pin
CPallini28-Nov-08 0:36
mveCPallini28-Nov-08 0:36 
AnswerRe: Best way of breaking from for loop Pin
Rajesh R Subramanian27-Nov-08 20:37
professionalRajesh R Subramanian27-Nov-08 20:37 
Resetting your loop counter variable is the worst thing to do. In this simple example, it might seem all OK to you, but what if there are other routines that will depend on the counter variable after the loop is complete? What if you needed to know how many times the loop executed?


vipin_nvk wrote:
Which method is efficient to use? Why?


Just exiting out of the loop with a break would be the ideal way, IMHO. You may use a control variable, as another user pointed out as well.


It is a crappy thing, but it's life -^ Carlo Pallini

Questionwhat is the "TOUCH" (UNIX) equivalent for windows? Pin
Nandu_77b27-Nov-08 3:13
Nandu_77b27-Nov-08 3:13 
AnswerRe: what is the "TOUCH" (UNIX) equivalent for windows? Pin
Randor 27-Nov-08 4:22
professional Randor 27-Nov-08 4:22 
AnswerRe: what is the "TOUCH" (UNIX) equivalent for windows? Pin
Ahmed Charfeddine27-Nov-08 9:32
Ahmed Charfeddine27-Nov-08 9:32 
Questionc++ array list Pin
phokojoe27-Nov-08 3:12
phokojoe27-Nov-08 3:12 
AnswerRe: c++ array list Pin
Maximilien27-Nov-08 3:36
Maximilien27-Nov-08 3:36 
QuestionRe: c++ array list Pin
CPallini27-Nov-08 7:35
mveCPallini27-Nov-08 7:35 
AnswerRe: c++ array list Pin
toxcct27-Nov-08 7:52
toxcct27-Nov-08 7:52 
GeneralRe: c++ array list Pin
CPallini27-Nov-08 8:20
mveCPallini27-Nov-08 8:20 
GeneralRe: c++ array list Pin
Larry Mills Sr28-Nov-08 15:40
Larry Mills Sr28-Nov-08 15:40 
QuestionHow to: Recive Windows Messages in a dll Pin
Klive827-Nov-08 2:53
Klive827-Nov-08 2:53 
AnswerRe: How to: Recive Windows Messages in a dll Pin
Code-o-mat27-Nov-08 3:44
Code-o-mat27-Nov-08 3:44 
QuestionXAML Pin
john563227-Nov-08 1:31
john563227-Nov-08 1:31 
QuestionHow can relese memory from controls? Pin
Le@rner27-Nov-08 0:53
Le@rner27-Nov-08 0:53 
AnswerRe: How can relese memory from controls? Pin
Maximilien27-Nov-08 0:57
Maximilien27-Nov-08 0:57 
GeneralRe: How can relese memory from controls? Pin
Le@rner27-Nov-08 1:05
Le@rner27-Nov-08 1:05 
GeneralRe: How can relese memory from controls? Pin
Maximilien27-Nov-08 1:32
Maximilien27-Nov-08 1:32 
GeneralRe: How can relese memory from controls? Pin
Le@rner27-Nov-08 1:38
Le@rner27-Nov-08 1:38 

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.