Click here to Skip to main content
15,867,975 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two files .and i have two process for two files .then contains of files are writen one by one(row).
for example:
files1:abc
def

files2:xyz

./combine "what are you doing" files1.txt files2.txt

program image:

what are you doing
abc
xyz
def

how i make this?:confused:
Posted

1 solution

  • Read the command line arguments one by one

  • if the argument refers to a file


    • read next line of file

    • send line to output stream

    • repeat until end of file


  • if not file, echo to output stream

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900