Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Of course you can do this in c++. The second form of your declaration is the standard way of doing things. How did you learn c++, that this was a surprise to you?

Secondly, that’s not a ‘type hint’ and c++ did not get this from python. Prior to c++17, there was no auto and all declarations were like this. If anything, Python got the names from c++



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: