VS Code: Code shows errors in IDE, yet builds are successful

I fixed it by updating my c_cpp_properties.json. The “defines” field can take values in the form of “define=value”, so in my case I was working with a FPSGAME_API causing the issue and I made my defines:

            "defines": [
                "_DEBUG",
                "UNICODE",
                "FPSGAME_API="
            ],

You can probably do something similar with
“SIMPLESOCKETS_API=”