Re: using std::system

From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 10/19/04


Date: Tue, 19 Oct 2004 12:23:38 +0100

In article <cl2sit$3ta$1@news-02.connect.com.au>, Edo
<eddod@eddododod.dod> wrote:
>
> I should rewrite this... I understand what the system rutine takes, but
> how can I pass variables as filenames here.

That shouldn't be too difficult.

string infile = "somefile";
string outfile = "someotherfile";

system("wc -l " + infile + " > " + outfile);

should do the trick, I think.

Alwyn



Relevant Pages

  • Re: using std::system
    ... | In article, Edo ... |> I should rewrite this... ... I understand what the system rutine takes, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: FindFirstFile, how much faster than FindNextFile?
    ... The ends of the filenames will look like this. ... the capital letter and the ".txt" ... >that you need to scrap this entirely and rewrite it. ... me that using the switch statement is less robust. ...
    (microsoft.public.vc.mfc)
  • Iterations
    ... I'm building a script to find and log specific file names on a PC. ... would do it now is just to rewrite the logging portion. ... So if the filenames were "filename1, filename2, filename3 etc.", it may use ...
    (microsoft.public.windows.server.scripting)