Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/164.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ c++;持续性操作_C++_Iostream - Fatal编程技术网

C++ c++;持续性操作

C++ c++;持续性操作,c++,iostream,C++,Iostream,我有一些代码,看起来像这样 debug_file << left << setw(10) << timestamp << left << setw(10) << activity_type << left << setw(10) << key << setw(10) << left << event_data1 << setw(10) &

我有一些代码,看起来像这样

debug_file << left << setw(10) << timestamp << left 
<< setw(10) << activity_type << left << setw(10) << key << setw(10) 
<< left << event_data1 << setw(10) << left << event_data2 << setw(10) 
<< left << event_data2 << endl;

debug_file您可以使用内置函数:


我想你要找的术语是粘性。在这条评论后发现这个帖子,似乎除了setw之外,其他东西都是粘性的。好吧,这就把我带到了这个页面,因为之前没有找到它,我觉得很傻。谢谢
// all output to debug_file defaults to left justify unless specified
// all output to debug_file defaults to setw(10)
debug_file << timestamp << activity_type << key << event_data1 << event_data2 
<< event_data3 << endl;