Если я ставлю точку с запятой после ElseIf Thn его не выполнять иначе, если заявление, что я делаю
Да, это ожидаемое поведение! И распространенная ошибка, чтобы никогда не забывать, что пришлось отлаживать один.
if(someCondition); //BAD BAD BAD
//an empty code block is run when someCondition is true -- not very useful
{...instructions...} //these are run regardless of someCondition
Кроме того, эти общие ошибки:
for(int i=0;i<1000;i++); //BAD BAD BAD!
{ ... instructions ... } //this is only run once, regardless of i.
//Actually i is out of context here, so compiler will point it out...
int i=0;
while(i<1000); //BAD BAD BAD!
{...instructions...} //never run, as the while loop (thanks jlordo) runs infinitely
//i is valid, and has the value of 1 - so compiler will be quiet...
Вам не хватает пробела 'else if' – Bart
elseif должно быть else if –
' Если я положил точку с запятой после elseif, то она не выполнит else if statement what i do' Да, так оно и работает! – ppeterka