Better HN
topnewbestaskshowjobs
Log inSign up

pontobart

1 karma · joined Jan 9, 2017 (9y ago) · 2 submissions

Submissions

comment 3y ago · link · parent

Off-by-one error given that 1900 was the last year of the century?

comment 9y ago · link · parent

You cannot overload on the const. If you try to define both int a(int b) and int a(const int b) the compiler will complain about a redefinition.

You can declare the function using int a(int b) in the header and then define it via int a(const int b).