passing argument to a file

This is a discussion on passing argument to a file within the C Programming forums, part of the General Programming Boards category; i am doing C programming how can i pass an argument from one file to another file.........i dont want to ...

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    36

    passing argument to a file

    i am doing C programming
    how can i pass an argument from one file to another file.........i dont want to use the system command

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,485
    When you say file, do you mean program?

    Assuming so, then you could do
    a) write out the information you want to pass between programs using a file, then read that file from your other program
    b) use whatever process creation functions (say fork()/execl()) are appropriate to your OS
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    If you are on windows, use ShellExecute() or ShellExecuteEx().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File Writing Problem
    By polskash in forum C Programming
    Replies: 3
    Last Post: 02-13-2009, 09:47 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM

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