I'm trying to run some C++ code on Linux and Microsoft Windows. But I'm trying to include some code for only one operating system and not the other one. How can I go about doing this? This is what I have so far:
... // linux code goes here.
... // windows code goes here.
#error "OS not supported!"
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!