Header file and global variable

If I am using #include < iostream > header file, then I am getting correct output. But when I am using #include < bits/stdc++.h> header file, I am getting error in global variable, which I have declared.

Here is the implementation of my NQueen problem where I am using a global variable count to count possible Nqueen.

std::count is a function from the standard library.
http://www.cplusplus.com/reference/algorithm/count/

Since you use the namespace std , “count” can refer to either std::count or the variable count .

You need to either rename your variable, or stop using the std namespace.
You can also include only the c++ headers that you need instead of bits/stdc++.h which includes all of them.
@lakshyatoshniwal i hope your doubt is cleared if yes dont forget to mark it as resolved :smiley: