Job 19018

Owner
BxG Akriel
Problem
Bits
Contest
MindCoding 2017 Round 2 Bosch (Div. 1)
Source
0.48KB
Result
Compile error (Non-zero exit status: 1)

Compiler output

prog.cpp:5:27: error: 'int index' redeclared as different kind of symbol
 int number, totalNumbers, index, finalNumber;
                           ^
In file included from /usr/include/c++/4.9/cstring:42:0,
                 from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:48,
                 from prog.cpp:1:
/usr/include/string.h:482:1: note: previous declaration 'const char* index(const char*, int)'
 index (const char *__s, int __c) __THROW
 ^
prog.cpp: In function 'int main()':
prog.cpp:13:21: error: overloaded function with no contextual type information
         for ( index = 1; index <= number; index <<= 1 );
                     ^
prog.cpp:13:35: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
         for ( index = 1; index <= number; index <<= 1 );
                                   ^
prog.cpp:13:49: error: overloaded function with no contextual type information
         for ( index = 1; index <= number; index <<= 1 );
                                                 ^
prog.cpp:14:15: error: overloaded function with no contextual type information
         index >>= 1;
               ^
prog.cpp:15:41: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>>'
         finalNumber = index + (index >> 1);
                                         ^

Questions?

Sponsors Gold