Hacker News new | ask | show | jobs
by sgerenser 10 days ago
How many C++ programs, particularly ones looking to be compiled with a modern compiler, use octal literals? I’ve personally never seen them used in my 20 years of using C++. Maybe something dealing with Unix file permissions?
2 comments

I have seen them, but it was mostly using leading 0 to align numbers, not realizing it was octal.
They have a few examples linked from the page above, and it's basically permissions and file stats, e.g. "IFMT = 00170000", "#define S_IRUSR 0000400", that kind of thing.