Opening file at command line

This is a discussion on Opening file at command line within the C++ Programming forums, part of the General Programming Boards category; I'm using Unix at the school (alpha). To compile I usually type cxx *.cpp and it gives me an a.out ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    13

    Opening file at command line

    I'm using Unix at the school (alpha). To compile I usually type cxx *.cpp and it gives me an a.out file. I typed a.out and it shows me the output for the progam. If I need to type the names of the input and output files at the command line, how do I do that? When I compile by typing "cxx *.cpp" it gives me this msg:



    Code:
    ld (prelink):
    processInfile.o compressed: processInfile(ifstream&, char&): multiply defined
    ld:
    processInfile.ocompressed: processInfile(ifstream&, char&): multiply defined
    It creates an a.out file, but if I type a.out, it says execute permission denied. If I type "cxx *.cpp blob1.dat outfile.dat" it gives me:

    Code:
    Object file format error in: blob1.dat: read_pass1_info_malloc: bad file magic n
    umber
    ld:
    processInfile.o compressed: processInfile(ifstream&, char&): multiply defined
    Object file format error in: blob1.dat: read_cur_obj_info: bad file magic number
    (0x2c32)
    Last edited by Wiggin; 04-27-2002 at 02:31 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 11:39 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 08:54 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 05:10 PM

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