LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2004, 12:10 PM   #1
cswank
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
How can my application get my working directory?


Hello,
I am writting a program ( in C++) that reads text files and extracts data from them. I want to put the program in the file:/bin directory and run the program from the location of the input text files mentioned above, How can I do this without prompting the user to type in the full path of the input text files?

Thanks
 
Old 04-20-2004, 12:46 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
Code:
chdir("/bin")
in C or C++
 
Old 04-20-2004, 01:21 PM   #3
cswank
LQ Newbie
 
Registered: Apr 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Thsnks, but I was making it more difficult than it should have been. I took out all attempts at inputting any kind of path and it works fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA sound only working with one application at a time squat001 Linux - Software 5 05-12-2013 01:58 AM
My Link Directory Application: Please Help Beta Test This vharishankar General 12 07-18-2005 10:46 AM
associate application with directory ukd Linux - Software 0 10-28-2004 10:40 AM
Default Application Directory linuxnubx Slackware 3 07-11-2004 09:49 PM
Application Installation Directory tuka Linux - Newbie 1 09-01-2003 08:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration