compilation error in lead game


#1

Here’s the code:


the error is:error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream’ and ‘’)


#2

The variable max has been defined inside your for loop. Initialize it before your for loop and your code should be able to run.

Also please put your program language as a tag when you ask questions.