作者:顺辉1988 | 来源:互联网 | 2023-06-07 16:13
#include
#include
#include
#include
int _tmain(int argc, _TCHAR* argv[])
{
int a = 1;
//输出: 1
std::cout<//输出: ***1
std::cout<//输出:***12
int b &#61; 2;
std::cout<system("pause");
return 0;
}
头文件:
#include
#include
using namespace std;
功能:
std::setw &#xff1a;需要填充多少个字符,默认填充的字符为&#39; &#39;空格
std::setfill&#xff1a;设置std::setw将填充什么样的字符,如:std::setfill(&#39;*&#39;)