Are parentheses (()) different than brackets in the C++ programing language?
Parentheses enclose the parameters of a function. A traditional way of saying it would be int main(void) to indicate there are no parameters — so we just use empty parentheses instead. Brackets enclose the bodies of functions and of blocks within functions where you can declare variables which are not visible outside those functions thus: int main(){ char a; … } int myfunc(char Dennis){ char a; … } The compiler knows which char a you are talking about in each case, so long as you don’t try to access the other one, which is out of scope in each function.