for loop issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • momotaro
    Contributor
    • Sep 2006
    • 357

    for loop issue

    the second loop is not accessed don't know y?? plz help
    Code:
    	for(i = 0; i < *nbrTwoEppee; i++)
    		{
    			//printf("in the firts for");
    			for(j = i + 1; j < *nbrTwoEppee - 1; j++)
    			{
    				printf("in the second for");
    				if(cond)
    				{
    
    					combOne = oneEppee[i];
    					combTwo= twoEppee[j];
    				}
    			}
    		}
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Maybe the value of *nbrTwoEppee is less than zero or maybe the condition j < *nbrTwoEppee - 1 is never true ...

    kind regards,

    Jos

    Comment

    • momotaro
      Contributor
      • Sep 2006
      • 357

      #3
      thank you I figured it out

      Comment

      Working...