ISO C++ forbids comparison between pointer and integer [-fpermissive]| [c++]

前端 未结 4 1910
感情败类
感情败类 2021-01-11 10:38

I am trying to compile the following code on Ubuntu (64-bit), with Code::Blocks 10.05 as IDE:

#include 
using namespace std;
int main() {
            


        
4条回答
  •  长发绾君心
    2021-01-11 11:28

    In your code,you wrote char a[2]; which is wrong.You shoud've wrote char* a[2]; Then you can get your proper output.

提交回复
热议问题