1.cout输出
#include<iostream>
std::cout<< A<< B <<std::endl;
2.qDebug()输出
#include<QDebug>
QString s = "Jack";
qDebug() << "My name is " << s << ", nice to meet you!" << endl; //方式1
qDebug("My name is " + s.toLatin1() + ", nice to meet you!\n"); //方式2
方式1:相当于c++中的cout,使用规则都一样; 可以连接字符串
方式2:不能直接连接QString类型的,要用 toLatin1() 函数将其转为为QByteArray才行