无法将const char转换为字符串构造字符串

时间:2018-02-17 06:13:05

标签: c++

为什么这样做

$tid_user_details=900000007;
            $did=60000003;
            $AcDate=201802170001;
            $category=11;
            $subj="hi just test";
            $dt=1518847118;

            $response=0;
            $alloted_to='support';
            $alloted_status='SA';
            $status='P';
            $contact="9994541232";


            $query="INSERT into associate_query (tracking_id, distributor_id, support_ticket_no, category, subject, post_query_date, response_date, alloted_to, alloted_status, status, contactno) values (?,?,?,?,?,?,?,'?','?','?',?)";
            $stmt=mysqli_prepare($db_selectsupport,$query);
            $stmt->bind_param($stmt,'iiissiissss', $tid_user_details,$did,$AcDate,$category,$subj,$dt,$response,$alloted_to,$alloted_status,$status,$contact);
            mysqli_stmt_execute($stmt);

但这不是

auto f = std::string();
f = "src.Id";

1 个答案:

答案 0 :(得分:1)

这是因为

std::string f();

声明一个函数f,它不带参数并返回一个字符串。它经常(但错误地)被称为最令人烦恼的解析。