我有一张卡片卡,可以一次将卡片打印到终端上。但由于终端的工作原理,它们会垂直打印。是否有某种方式或功能让他们并排打印?这是我的代码的一个例子。并排打印卡座
cout << "---------" << endl;
cout << "|"<<"6"<<setw(7)<<"|"<<endl;
cout << "|"<<setw(4)<< "S" << setw(6)<<"S"<<setw(2)<<"|"<<endl;
cout << "|"<<setw(8)<<"|"<<endl;
cout << "|"<<setw(8)<<"|"<<endl;
cout << "|"<<setw(4)<< "S" << setw(6)<<"S" <<setw(2)<<"|"<<endl;
cout << "|"<<setw(8)<<"|"<<endl;
cout << "|"<<setw(8)<<"|"<<endl;
cout << "|"<<setw(4)<< "S" << setw(6)<<"S"<<setw(2)<<"|"<<endl;
cout << "|"<<setw(7)<<"6"<<"|"<<endl;
cout << "---------" << endl;
你知道'endl'会将你移动到下一行,对吗? – nhgrif