public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Moises D. Deangelo <lewris@ig.com.br>
To: cygwin@cygwin.com
Subject: Re: system() refuses to work!!! HELP
Date: Wed, 15 Oct 2003 06:34:00 -0000	[thread overview]
Message-ID: <20031015063400.ktxGikRGayeEho9hpWC7tHM7j82Ma1CFz0SSa_ds7Xs@z> (raw)

It did not work. Will it be that I found a bug??? How much luck I have.. :-) 
It follows the source. that program does not do anything of important! It is 
alone a test. 

what we most can do? 

I changed the command for "DIR" who list the directories of the windows just 
to facilitate the comprehension and so that it to do not are necessary to do 
an upload of sound.exe. Try, with that program execute some other command! 
Here, already tried of everything, and anything (not) worked. 


************************************************* 

#include <stdlib.h> 
#include <math.h> 
#include <stdio.h> 

main() 
{ 
int a,b,c,d,e,f,g,h,j; 

FILE *stream; 

printf("Programa Gerador de Resultados para Teste:"); 
printf("\n\nEntre com as Faixas"); 
printf("\nNúmero a ser comparado: ");scanf("%d",&c); 
printf("\n....................De: ");scanf("%d",&a); 
printf("\n.....................A: ");scanf("%d",&b); 

d = c; 
f = a; 
g = b; 

j = 1; 

while(g <= c){ 
     e = f * g; 
     h = d - e; 
     if((stream = fopen("dtr1.txt", "at")) != NULL){ 
                fprintf(stream,"\n %d * %d = %d -r = %d",f,g,e,h); 
     } 
     fflush(stdout); 
     fclose(stream); 
     if(j >= c){ 
          f = a; 
          j = 0; 
          g++; 
          printf("\nF: %d\tG %d:",f,g); 
          fflush(stdout); 
     } 
     f++; 
     j++; 
} 

if((system("dir")) == 0){ 
     printf("\n\nComando executado com sucesso"); 
} 
else{ 
     printf("\n\ncomando falhou"); 
} 

} 

*********************************************** 



Em 15 Oct 2003, cygwin@cygwin.com escreveu: 

>On Wed, Oct 15, 2003 at 01:10:08AM -0300, Moises D. Deangelo wrote: 
>>When entering with the command ls -l /bin/sh.exe, the appeared following: 
>> 
>>-rwxr-x---+ 1 Diego Usu?rios 83456 Aug 11 10:45 /bin/sh.exe 
> 
>Ok. The next question is if "sound.exe" is in your path. Does something 
>like: 
> 
>system("/cygdrive/c/dir/sound.exe") 
> 
>work? 
> 
>/cygdrive/c/dir would be cygwin's way of typing c:/dir 
> 
>dir would be the place where sound.exe lives. 
> 
>-- 
>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple 
>Problem reports: http://cygwin.com/problems.html 
>Documentation: http://cygwin.com/docs.html 
>FAQ: http://cygwin.com/faq/ 
> 
>---------- 

_________________________________________________________
Voce quer um iGMail protegido contra vírus e spams? 
Clique aqui: http://www.igmailseguro.ig.com.br
Ofertas imperdíveis! Link: http://www.americanas.com.br/ig/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

             reply	other threads:[~2003-10-15  5:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-15  6:34 Moises D. Deangelo [this message]
     [not found] <E1A9eYj-0000oV-00@m1.dnsix.com>
2003-10-15  9:10 ` Chris January
2003-10-15 15:09   ` Igor Pechtchanski
  -- strict thread matches above, loose matches on Subject: below --
2003-10-15  7:46 Moises D. Deangelo
     [not found] <E1A9czu-00067Y-00@quimby.gnus.org>
2003-10-15  5:50 ` Andrew DeFaria
     [not found] <200310150410.h9F4AXM31666@mx1.redhat.com>
2003-10-15  5:21 ` Christopher Faylor
2003-10-15  4:25 Moises D. Deangelo
     [not found] <200310150050.h9F0ogM22662@mx1.redhat.com>
2003-10-15  2:38 ` Christopher Faylor
2003-10-15  2:05 Moises D. Deangelo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031015063400.ktxGikRGayeEho9hpWC7tHM7j82Ma1CFz0SSa_ds7Xs@z \
    --to=lewris@ig.com.br \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).