Article View: es.comp.os.linux.programacion
Article #8454Problemas con unix y windows
From: Francisco de Asis Tarancon Jodra...
Date: Sun, 03 Nov 2002 21:50
Date: Sun, 03 Nov 2002 21:50
21 lines
1957 bytes
1957 bytes
Hola, estoy haciendo un programa que quiero que funcione tanto en Windows
como en Unix.
En el programa estoy usando el comando CLS para windows y el CLEAR para
Unix, pero quiero que cuando este en windows use el CLS, y cuando lo use en
Windows, use el CLEAR.
Para ello, en el archivo principal he puesto en la parte superior
#define SO_WINDOWS
#define SO_UNIX
Y en la parte de codigo que quiero que me compile segun el SO tengo puesto:
#ifdef SO_WINDOWS
system("cls");
#else SO_UNIX
system("clear");
#endif
En Windows me funciona bien, pero sim embargo en Unix no.
Alguien me puede ayudar?! Un saludo
Technical Details
Message-ID:
<1036360293.741080@seux119>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!gestalt.direcpc.com!telocity-west!TELOCITY!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!news.telia-iberia.com!news.rediris.es!newsfeed.bt.es!news.bt.es!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit X-Google-Thread: f86c8,65e1cbcbe1a2d559,start X-Google-Attributes: gidf86c8,public X-Google-ArrivalTime: 2002-11-03 13:52:43 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!gestalt.direcpc.com!telocity-west!TELOCITY!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!news.telia-iberia.com!news.rediris.es!newsfeed.bt.es!news.bt.es!not-for-mail From: "Francisco de Asis Tarancon Jodral" <paco_tarancon@supercable.es> Newsgroups: es.comp.os.linux.programacion Subject: Problemas con unix y windows Date: Sun, 3 Nov 2002 22:50:14 +0100 Organization: Supercable Andalucia, S.A. Lines: 23 Message-ID: <1036360293.741080@seux119> NNTP-Posting-Host: 212.79.128.146 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: titan.bt.es 1036359362 10780 212.79.128.146 (3 Nov 2002 21:36:02 GMT) X-Complaints-To: abuse@bt.es NNTP-Posting-Date: 3 Nov 2002 21:36:02 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Cache-Post-Path: seux119!unknown@cliente-212079146247.cm256.conpa.supercable.es X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)