nsstring and const char* conversion

前端 未结 4 1638
感情败类
感情败类 2020-12-14 09:35

i try to convert nsstring to const char*.

1- i add a nsstring and an integer together
2- then i convert this new nsstring to const char*
3- i have an object

4条回答
  •  自闭症患者
    2020-12-14 09:37

    const char* are constant, you can't assign them in anyway !

    Try passing (const char*)[firstName UTF8String] to your method

提交回复
热议问题