Thread: Piping in text output

  1. #1
    Registered User
    Join Date
    Jan 2010

    Piping in text output

    I got my program to work fine now I just need to handle user input from command line. They need to be able to pipe in the output of the text file using the cat utility as such

    cat text.txt | ./program

    is there any special way i need to handle this outside of
    int main(argc argv)

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    There's a difference between piping and command line arguments (a lot of differences; in fact they have nothing in common). If your users are piping input in, then just read from stdin and that's it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Text output into other applications
    By melchior in forum C Programming
    Replies: 9
    Last Post: 09-21-2005, 01:40 AM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  3. Piping output under .NET
    By sean in forum C# Programming
    Replies: 1
    Last Post: 10-07-2004, 03:20 PM
  4. sorting characters and output to text file
    By odb1 in forum C++ Programming
    Replies: 1
    Last Post: 10-10-2003, 04:46 PM
  5. Recording console window output to a text file?
    By HolySmiter in forum C++ Programming
    Replies: 3
    Last Post: 02-24-2002, 03:13 PM