0
Where should I use {} ;() appropriately?
I'm coding on Glitch with help of friend, but I always makes errors, I don't know number }or{ require and where to put it, and also (); I need but explaination about this. Thanks btw
1 Answer
+ 1
{} at the beggining and end of functions and compound statements
{}; for classes and structs you also add ; after the } at the classâs end
() is used mostly as defined, for example âif(statement) { ... }â, or to show operator priority in expressions like â x + y * (6 + x)â
There might be more but thatâs all I can think of now...