Ask Your Question
2

What sets C++ stream apart from print() with regard to their fillers?

asked 2022-12-18 11:00:00 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-02-02 23:00:00 +0000

qstack gravatar image

In C++, streams have a built-in fill character that can be set using the std::setw() function. This fill character is used automatically when printing elements with a specified width.

On the other hand, print() in some programming languages may not have a built-in fill character or width specifier, requiring developers to manually add padding using loops or string concatenation.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-12-18 11:00:00 +0000

Seen: 14 times

Last updated: Feb 02 '23