Hi i doing a table which updates scores and stuff .Everything worked fine when i was using numbers to postion the teams but now that i am using strings and stuck a for and if loop. it does not update any more help.
problem is after the ********** bit it stops and wont update the table. i played around with it and if i can iclude the code within the loop it works but it does everything 12 times any ideas wats gone wrongCode://for label 1 for(blah blah)//loops 12 times tillit finds correct label { if ( strcmp((teams[one].label,teamlabel1)==0) { scanf("%d",&tempi1); //do stuff which gives tempi1 which has been declared } else{ } } //label2 //enter label 2 name using scanf for(blah blah)//loops 12 times tillit finds correct label { if ( strcmp((teams[one].label,teamlabel2)==0) { scanf("%d",&tempi2); //do stuff which gives tempi2 which has been declared } else{ } } //*********************************** teams[label2].f = teams[label2].f + tempi; teams[label1].f = teams[label1].f + tempi; if (tempi1>tempi2) { //DO stuff } //update table }if i move it out the for loop it stops updating the table again ? i think the information has to be inside one of the brackets but so far no success



LinkBack URL
About LinkBacks
if i move it out the for loop it stops updating the table again ? i think the information has to be inside one of the brackets but so far no success 


