What does this quote about char pointers mean?

后端 未结 4 1820
长情又很酷
长情又很酷 2021-01-24 06:24

I\'ve read a paragraph but I can\'t understand what does it mean....can anyone please explain? the paragraph is :

processing a single character as a cha

4条回答
  •  感动是毒
    2021-01-24 07:18

    I'd dump the book or whereever you got that quote from. What is probably meant is you shouldn't try something like this:

    char c = 'a';
    strcmp(&c,"a"); // might accidentally work on some systems, but behaviour is undefined
    

提交回复
热议问题