Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » source with file.dat
source with file.dat [message #781924] Sun, 22 January 2012 18:59 Go to next message
Roberto Zanetto is currently offline Roberto ZanettoFriend
Messages: 5
Registered: January 2012
Junior Member
I'm a newbie in using eclipse, it is very powerful software.
I have a source file created by myself, the source reads numbers from file.dat.
Where should I put (=in which folder) the file.dat to run and debug my program in eclipse?

Thank You

Robert from Italy
Re: source with file.dat [message #782036 is a reply to message #781924] Mon, 23 January 2012 02:11 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 01/22/2012 12:59 PM, Roberto Zanetto wrote:
> I'm a newbie in using eclipse, it is very powerful software.
> I have a source file created by myself, the source reads numbers from
> file.dat.
> Where should I put (=in which folder) the file.dat to run and debug my
> program in eclipse?
>
> Thank You
>
> Robert from Italy
That depends on where your program expects to find the file. If is
looking for it in an absolute location, you have to put it there (only
you would know where this location is). If it is relative to the
working directory, you can set the directory to run you program in on
the Launch Config editor. You then need to place the file the the
appropriate location relative to the working directory.
Re: source with file.dat [message #782494 is a reply to message #782036] Mon, 23 January 2012 20:29 Go to previous messageGo to next message
Roberto Zanetto is currently offline Roberto ZanettoFriend
Messages: 5
Registered: January 2012
Junior Member
I have a file relative to the working directory, shall i put in workspace-my source folder?
Re: source with file.dat [message #782498 is a reply to message #782494] Mon, 23 January 2012 20:35 Go to previous message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
Look at the Launch Config for the program. That will tell you the directory that the program will be run in. You then have to apply the same relative offset to this location that your program will apply and place the file there.
Previous Topic:Field 'tv_nsec' could not be resolved
Next Topic:problem with structure in .h file
Goto Forum:
  


Current Time: Mon May 13 11:12:41 GMT 2024

Powered by FUDForum. Page generated in 0.04195 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top