Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b411bd8

Browse files
[basicTypes] Prefix binary representation with 0b.
Thanks to Oliver for this idea!
1 parent efe3f1c commit b411bd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎exercises/basicTypes/PrintHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void printWithTypeInfo(std::string expression, auto const & t, bool useBitset =
2222

2323
std::cout << std::left << std::setw(30) << expression << " type=" << std::setw(20) << realname << "value=";
2424
if (useBitset) {
25-
std::cout << std::bitset<16>(t) << "\n";
25+
std::cout << "0b" << std::bitset<16>(t) << "\n";
2626
} else {
2727
std::cout << std::setprecision(25) << t << "\n";
2828
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /