+ 1

What is curly braces

Please someone should give me indebt understanding of what curly braces are how use them where to use them when proper in line of code.

26th Mar 2018, 7:06 AM
Felicia Dandy
7 Answers
+ 3
https://code.sololearn.com/cwPLTw2P3I9R/?ref=app They have different uses: 1.) code inside of curly braces belongs together i.e. belongs to a scope. after all commands in the scope are executed all variables from inside the scope will get deleted. this allows you to define the same variable in different scopes without colision 2.) initialization: since c++11 (i think) you can give the variable a value directly when declaring it
26th Mar 2018, 8:49 AM
pur80a
pur80a - avatar
+ 2
I can't help you with the details as I haven't started studying c++ yet but the curly braces are { and }
26th Mar 2018, 7:11 AM
Memphis Reigns
Memphis Reigns - avatar
+ 2
Ah I see, well I hope somebody can come along with more help for you. Good luck. If no one responds, I will try to find out for you.
26th Mar 2018, 7:16 AM
Memphis Reigns
Memphis Reigns - avatar
+ 1
Thank you. i know too well of that but my main point is where to be placing when necessary is all i want to have a deep understanding for.
26th Mar 2018, 7:14 AM
Felicia Dandy
0
Okay thanks.
26th Mar 2018, 7:17 AM
Felicia Dandy
0
Thank you sir.
26th Mar 2018, 7:22 AM
Felicia Dandy