Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
_RPM
on Sept 18, 2014
|
parent
|
context
|
favorite
| on:
C++ Quiz
I don't think you are right. Regardless if what is after that contained in the `...` wouldn't matter. A lone `{` or `}` would be a syntax error.
shmerl
on Sept 18, 2014
[–]
As I said, it wouldn't be a syntax error if ... contained the matching { somewhere inside.
That lone } which seemingly belongs to if in this case would be closing the function.
adm_hn
on Sept 18, 2014
|
parent
[–]
They are talking about the } after the return, not the one after the ... i.e. else return(1); }
shmerl
on Sept 18, 2014
|
root
|
parent
[–]
Yes, that's what I understood. That } after return matches to the function opening {. So it's correct syntactically, but is wrong according to intention.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: