我想比较一个字符串,而不是将其中一个实际定义为字符串,就像这样,
if (string == 'add')
我是否必须声明'add'为字符串或是否可以以类似的方式进行比较?
'add'
c++ string compare
c++ ×1
compare ×1
string ×1