Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #5958

Re: Why this doesen't work

From "Joachim Schmitz" <nospam.jojo@schmitz-digital.de>
Newsgroups comp.lang.c
Subject Re: Why this doesen't work
Date 2011-06-13 11:14 +0200
Organization 1&1 Internet AG
Message-ID <it4kdm$cn8$1@online.de> (permalink)
References <it4jla$gqh$1@ss408.t-com.hr>

Show all headers | View raw


Robert Bralic wrote:
> Why this doesen't work

> #include<stdio.h>
> 
> 
> int main(int argc, char *argv[]){
>   FILE *fp;
>   fp=fopen("LPT1:", "w");
>   fprintf(fp,"Hello World");
>   return 1;
> }

Define "doesn't work".
It seems to work just fine here:

$ cat hello.c
#include<stdio.h>


int main(int argc, char *argv[]){
   FILE *fp;
   fp=fopen("LPT1:", "w");
   fprintf(fp,"Hello World");
   return 1;
}
$ make hello
c89 -o hello hello.c
$ ./hello
$ echo $?
1
$ cat LPT1:
Hello World$ 


Bye, Jojo

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why this doesen't work "Robert Bralic" <robert.bralic@si.t-com.hr> - 2011-06-13 11:01 +0200
  Re: Why this doesen't work "Kleuskes & Moos" <kleuske@xs4all.nl> - 2011-06-13 02:11 -0700
  Re: Why this doesen't work "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2011-06-13 11:14 +0200
  Re: Why this doesen't work Ike Naar <ike@iceland.freeshell.org> - 2011-06-13 09:42 +0000
    Re: Why this doesen't work pacman@kosh.dhis.org (Alan Curry) - 2011-06-13 20:04 +0000
  Re: Why this doesen't work "Heinrich Wolf" <invalid@invalid.invalid> - 2011-06-13 14:54 +0200
  Re: Why this doesen't work Mark Bluemel <mark_bluemel@pobox.com> - 2011-06-14 08:48 +0100
    Re: Why this doesen't work Dr Nick <3-nospam@temporary-address.org.uk> - 2011-06-14 21:06 +0100
  Re: Why this doesen't work Angel <angel+news@spamcop.net> - 2011-06-14 08:06 +0000
    Re: Why this doesen't work Keith Thompson <kst-u@mib.org> - 2011-06-14 05:10 -0700
      Re: Why this doesen't work Angel <angel+news@spamcop.net> - 2011-06-14 13:43 +0000
    Re: Why this doesen't work "Morris Keesan" <mkeesan@post.harvard.edu> - 2011-06-14 12:00 -0400

csiph-web