an error "expected unqualified-id before string constant" when compiling

Indentation is the visual structure of the code.
The compiler ignores it completely, but it helps humans follow the structure.
There are many different styles, but consistency is key.
If you find yourself typing a {, then type the matching } with exactly the same number of spaces in front of it.
Nested blocks have successively more spaces in front of them.
I'm pretty sure there's a Wikipedia page on the different styles.

I'm posting from my phone, so I can't easily post examples.