Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » if else UNIX WINDOWS
if else UNIX WINDOWS [message #1221824] Wed, 18 December 2013 13:51
luli amm is currently offline luli ammFriend
Messages: 3
Registered: December 2013
Junior Member
hi
i need to programm code which i can run on eclipse (mac) and visual studio (windows)

so i once found an option where i define the system once and then let the programm choose over conditions

i have no idea how to code that, i imagine something like this:

#define OS UNIX

if(OS==UNIX)
        #include "blaaa.h"
else
        #include <windows.h>


if(OS==UNIX)
       system("clear");
else
      system("cls");



does someone have some examples for me? for librarys as well as for methods?

[Updated on: Wed, 18 December 2013 13:52]

Report message to a moderator

Previous Topic:Eclipse C++ settings for MAC OSX
Next Topic:Editor window not synchronizing with Console window build errors
Goto Forum:
  


Current Time: Wed Apr 24 17:14:31 GMT 2024

Powered by FUDForum. Page generated in 0.02684 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top