Thread: How to print directly from compile screen?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    32
    is there any way i can redirect the output to a network printer installed on the local network..

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by technosavvy View Post
    is there any way i can redirect the output to a network printer installed on the local network..
    Read the posts in this thread.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    Quote Originally Posted by technosavvy View Post
    is there any way i can redirect the output to a network printer installed on the local network..
    Assuming that you're on a Windows network, You can use NetUseAdd to establish a connection to a remotely *shared* printer. Essentially, you would be programmatically executing the equivalent of the following NET USE command line statements:

    Assume PRTA is the current network printer being used by your workstation, you would first delete this connection as follows:

    NET USE LPT1 /DEL

    Now you wish to use PRTB as follows

    NET USE LPT1 \\SomeServer\PRTB

    Your have just changed your printing thru LPT1 from PRTA to PRTB. Again, assuming that PRTB is a SHARED printer.

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    65
    The remove function doesn't get rid of the file. Maybe I was unclear, but I want Test.txt to be deleted if that is easy.

    Also, when I create the file, can it be called a different name according to a string?(only matters if I can't delete it)

    Thanks
    -Matt

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by mcotter222 View Post
    The remove function doesn't get rid of the file. Maybe I was unclear, but I want Test.txt to be deleted if that is easy.

    Also, when I create the file, can it be called a different name according to a string?(only matters if I can't delete it)

    Thanks
    -Matt

    remove should certainly delete the file - that's what the function is for, if it doesn't do that, then something is broken in your C library.

    Quote Originally Posted by Man page
    The remove() function removes the file or directory specified by path.
    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How does this user get screen to run under root?
    By Overworked_PhD in forum Tech Board
    Replies: 2
    Last Post: 06-28-2009, 09:31 AM
  2. merging linked lists
    By scwizzo in forum C++ Programming
    Replies: 15
    Last Post: 09-14-2008, 05:07 PM
  3. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  4. how to print a file on the screen
    By tameeyore in forum C Programming
    Replies: 4
    Last Post: 09-18-2005, 12:00 PM
  5. Print Screen
    By /\/\ E /\/ @ in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-11-2002, 05:37 PM