undefine stdprn

This is a discussion on undefine stdprn within the C Programming forums, part of the General Programming Boards category; I used Borland c++5.5 to compile . Part of my code is like this, fprintf(stdprn,"\r\f"); when I compile , the ...

  1. #1
    pap
    Guest

    undefine stdprn

    I used Borland c++5.5 to compile .
    Part of my code is like this,

    fprintf(stdprn,"\r\f");


    when I compile , the error message was,"undefine stdprn".
    What thats mean.How I should rectify it.
    Thanks.

  2. #2
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    stdprn isn't a standard stream in C, apparently Borland 5.5 doesn't support it. The only way to fix it is to use another compiler that does support stdprn, or find another way to connect to your printer :-)
    *Cela*

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    FILE *stdprn;
    stdprn = fopen("LPT1", "w");

    Personally, I'd change the file stream name though, to avoid further conflicts. Also using LPT1 isn't guaranteed to work
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help me. undefine symbol in function main.
    By Melody in forum C Programming
    Replies: 5
    Last Post: 11-30-2007, 11:56 PM
  2. stdprn
    By zack787 in forum C Programming
    Replies: 0
    Last Post: 01-14-2006, 04:10 PM
  3. Undefined symbol 'stdprn'
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 07-03-2002, 03:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21