The code below shows error
#include<bits/stdio.h>
using namespace std;
int main() {
int n;
cin>>n;
if(log2(n)=="-inf")
cout<<"you entered zero";
}
The error it shows
stack_question.cpp: In function ‘int main()’:
stack_question.cpp:6:19: error: invalid operands of types ‘__gnu_cxx::__enable_if::__type {aka double}’ and ‘const char [5]’ to binary ‘operator==’
if(log2(n)=="-inf")
~~~~~~~^~~~~~~~
One more doubt
Is it a runtime error or compile time error??