我已经定义了一个值
extern char WEBSRV_ADMIN_ID[31]; char WEBSRV_ADMIN_ID[31]= "admin";
Run Code Online (Sandbox Code Playgroud)
然后我想在char语句中使用用户名进入sql as
const char *pSQL[1];
pSQL[1] = "update websrv_config set admin_id='" + WEBSRV_ADMIN_ID + "'";
Run Code Online (Sandbox Code Playgroud)
但似乎有一个错误
error: invalid operands of types ‘const char [36]’ and ‘char [31]’ to binary ‘operator+’
Run Code Online (Sandbox Code Playgroud)
我怎么能克服它?