Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 15th, 2004, 04:56 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Path

  Hallo everybody!

  I'm having problems with paths. Actually, I am trying to do a system call, passing a file as parameter to a software called "wgnuplot.exe", which is located at C:\Documents and Settings\tmoutinho\gnuplot\bin\, this way:

/*code*/
String* path = S"C:\\Documents and Settings\\tmoutinho\\gnuplot\\bin\\Mytext.dat";
/* instructions building the file Mytext.dat*/
system("wgnuplot.exe C:\\Documents and Settings\\tmoutinho\\gnuplot\\bin\\Mytext.dat");
and it doesn't work.

However, changing the path where the file "Mytext.dat" is built to the path where the executable file is built:

/*code*/
String* path = S"C:\\Documents and Settings\\tmoutinho\\estat\\Debug\\Mytext.dat";
/* instructions building the file Mytext.dat*/
system("wgnuplot.exe "C:\\Documents and Settings\\tmoutinho\\estat\\Debug\\Mytext.dat";
and it works.

It seems that in a system call I only can pass a file as parameter if the one is built in the same path where it is located my executable file. But, can't I specify the path I want, building my text file where it is more convenient, or is it mandatory to build the text file in the same directory of my main executable file?

Thanks everyone!
            Thiago

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with path for loading Pics (app.path) Tabbasum Beginning VB 6 2 November 15th, 2007 04:57 AM
Implementing the all-path shortest path problem bitwords XSLT 1 December 6th, 2006 11:37 AM
using app.path in database path and filename kd8con VB Databases Basics 2 October 25th, 2006 11:45 AM
get value, not the path... steelrose XSLT 2 June 15th, 2006 08:58 AM
Convert logical path to absolute path zoostar J2EE 1 April 15th, 2005 10:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.