Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef _WIN32
- //Windows
- #include "stdio.h"
- #include <iostream>
- #include "windows.h"
- #include "math.h"
- #elif __APPLE__
- #include "TargetConditionals.h"
- #include "stdio.h"
- #include <iostream>
- #elif __linux__ //__GNUC__
- // linux
- #include "stdio.h"
- #include <iostream>
- #elif __unix__
- // Unix
- #include "stdio.h"
- #include <iostream>
- #elif defined(_POSIX_VERSION)
- // POSIX
- #include "stdio.h"
- #include <iostream>
- #else
- # error "Unknown compiler"
- #endif
- using namespace std;
- int main(void)
- {
- #ifdef _WIN32
- {
- cout<<"Windows world"<<endl;
- system("pause");
- }
- #endif
- #ifdef __APPLE__
- {
- cout<<"Mac world"<<endl;
- }
- #endif
- #ifdef __linux__
- {
- cout<<"Linux world"<<endl;
- }
- #endif
- #ifdef __unix__
- {
- cout<<"Unix world"<<endl;
- }
- #endif
- #ifdef _POSIX_VERSION
- {
- cout<<"Posix world"<<endl;
- }
- #endif
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement