Code text colors wrong and won't execute, C++

First time using forum. is the link.

I typed my code into the Notion app and copy-pasted. It’s a bit long but executing the code throws errors on nearly every line. Am I missing a simple notation at the start?

That has likely warped some of your characters.


For starters, the opening and closing double quotes and the single quote (apostrophe) aren’t showing up correctly. I copy pasted your workspace into Notepad (any decent editor will work), selected an opening double quote and used the Replace All option to replace all opening double quotes with ". Then I did the same with the closing double quotes. Lastly, I selected a single quote and used the replace all to replace all of them with '

// Sample 
// Your workspace code:
std::cout << “1) Bow and 12 Arrows. Don’t spend them all in one place. \n”;

// After replacing with proper characters,
std::cout << "1) Bow and 12 Arrows. Don't spend them all in one place. \n";

After the above changes, you will get a lot of other error messages owing to different causes. I could just tell you why you are getting the different errors, but I don’t want to deny you the opportunity to try and fix them yourself first. Usually figuring out mistakes/issues yourself is more beneficial than just being told what changes to make.

Have a shot at figuring out the issues. If you are still stuck and can’t figure out some error(s), share your latest workspace code.

Thank you very much! I will work on that later tonight and see if I can figure out the rest :slight_smile: