C++代码中字符串分多行时的情况
#include <iostream>
int main(const int argc, const char* argv[])
{
    std::string strSql1 = "select * from table \
    where id = 1 \
    and name='name'";
    std::cout << strSql1 << std::endl;
    std::string strSql2 = "select * from table"
                          "where id = 1 "
                          "and name='name'";
    std::cout << strSql2 << std::endl;
    return 0;
}
结果:

 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号