this post was submitted on 12 Nov 2025
434 points (99.3% liked)
Programmer Humor
27322 readers
2231 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's valid for C too, but it will be either a double or a float.
Dude, after forcing
-std=c++20, the compiler still can't find a reference forstd::ostream::operator<<(float)...Do I have to link with some non-standard library? There doesn't seem to have any
numbers.aincluded with gcc.Weird, it should be standard C++20. Hope are you invoking gcc?
godbolt link: https://godbolt.org/z/6Tn4Kcjrs
Edit: be sure to call g++, not gcc.
Oh, that's right, I was using gcc.