← Back to archive

Stdle #126 · conversions · 2026-10-10

What does this C++ snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

#include <iostream>
struct Cents {
int v;
explicit Cents(int n) : v(n) {}
};
int main() {
Cents c = Cents(7);
std::cout << c.v << "\n";
return 0;
}
Conversions
4 attempts left

Answer & explanation