Borderou de evaluare (job #1234939)
Utilizator | Data | 28 septembrie 2014 13:06:13 | |
---|---|---|---|
Problema | Cautare binara | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int binary_search0(int, int, int)’:
user.cpp:20:8: error: ‘mid’ was not declared in this scope
if( A[mid] == target ) return mid;
^
user.cpp:21:2: error: ‘mid’ was not declared in this scope
mid--;
^
user.cpp: In function ‘int binary_search1(int, int, int)’:
user.cpp:36:8: error: ‘mid’ was not declared in this scope
if( A[mid] <= target ) return mid;
^
user.cpp:37:2: error: ‘mid’ was not declared in this scope
mid--;
^
user.cpp: In function ‘int binary_search2(int, int, int)’:
user.cpp:51:8: error: ‘mid’ was not declared in this scope
if( A[mid] >= target ) return mid;
^
user.cpp:52:9: error: ‘mid’ was not declared in this scope
return mid + 1;
^
user.cpp:53:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !