- Add the semicolons back to any line that doesn't start with '#' and doesn't end with ':'
- Replace all the ':' with '{'.
- Fill in all of the '}' where they belong, which is probably easier to do by hand on such a short script than to write any logic to do it for you.
Once you've restored it to valid C++, you should be set.
- Add the semicolons back to any line that doesn't start with '#' and doesn't end with ':'
- Replace all the ':' with '{'.
- Fill in all of the '}' where they belong, which is probably easier to do by hand on such a short script than to write any logic to do it for you.
Once you've restored it to valid C++, you should be set.