//
//三者都起到换行的作用
//endl:除了换行之外,还调用flush函数--刷新缓冲区
//即cout << endl == "\n" == '\n';
#include<iostream>
int main(){
std::cout << "李晓洁" << std::endl;
std::cout << "周田心" << "\n" << std::flush;
std::cout << "\n" << "hh" << '\n' << "kk" << std::endl;
return 0;
}
c++中endl、"\n"和'\n'的区别
最新推荐文章于 2022-05-29 06:40:38 发布