3 ms·
The example I know is the following line: foo * bar; This is either an expression statement computing the product of `foo` and `bar` or the declaration of
by demurgos 8y ago
The example I know is the following line:
foo * bar;
This is either an expression statement computing the product of `foo` and `bar` or the declaration of a variable `bar` as a `foo` pointer.
To solve this ambiguity, you need context: if `foo` is a type available in the current scope then it's a variable declaration, otherwise an expression.