LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack 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: 33
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
ALSA sound only working with one application at a time squat001 Linux - Software 0 07-08-2004 08:46 AM
Application Installation Directory tuka Linux - Newbie 1 09-01-2003 08:24 AM


All times are GMT -5. The time now is 05:05 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration