Thread: Where are files created during File handling using Dev C++ compiler??

  1. #1
    Registered User
    Join Date
    May 2012
    Location
    India
    Posts
    12

    Where are files created during File handling using Dev C++ compiler??

    Hi,

    Can anyone tell me the folder where the files created during file handling program are stored?? I am using Dev C++ IDE......

    For ex- fpointer = fopen("library.bin","w");

    Where does library.bin gets created? What folder?

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    Most likely in the folder with the .EXE file -- where the program itself resides.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    This is not actually a C question. It depends on a few things, unrelated to C. It is generally placed in the current working directory, which is set when the program is run.

    IDE's are actually able to specify the working directory that they start programs in - the way to make that setting depends on IDE. If that setting is not specified, the directory is usually the directory containing your executable. In some cases, it is the directory containing the executable for the IDE itself.

    Bear in mind that some programs can set their own working directory - under posix, for example, by using a function called chdir().

    Some operating systems provide means of controlling the working directory when starting a program. For example, it is common for shorttcuts under windows to specify the working directory for a program they link to.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    You know what else works here?

    1. Compile the program.
    2. Run the program.
    3. Use the search functionality of your OS to search for the created file.

    This is logical. Logic is required to be a programmer. I don't know how any programmer could not figure this out on his or her own.

  5. #5
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    Are you saying that once you install a compiler you are a programmer?
    Or once you write you first program you are a programmer?

    I disagree.

    IMO, you become a programmer more when you are able to figure it out, therefore, he's not a programmer yet.
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by WaltP View Post
    Are you saying that once you install a compiler you are a programmer?
    Or once you write you first program you are a programmer?

    I disagree.

    IMO, you become a programmer more when you are able to figure it out, therefore, he's not a programmer yet.
    I say once you write, compile, and run the first program that works right you are at least a bad programmer.
    I do consider the requirements to be a good programmer much higher.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  7. #7
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by stahta01 View Post
    I say once you write, compile, and run the first program that works right you are at least a bad programmer.
    I do consider the requirements to be a good programmer much higher.
    Given the rate of flaws that occur even in well-engineered programs (1-5 errors per thousand lines of code) it might be argued that nobody can be a good programmer unless the bar to being "good" is set pretty damned low.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  8. #8
    Registered User
    Join Date
    May 2012
    Location
    India
    Posts
    12
    I am just a learner.....
    Or may be an awsome programmer in near future...

    Thanx to all of you anyway.....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File handling and header files?
    By linkstatic in forum C++ Programming
    Replies: 3
    Last Post: 12-20-2011, 03:18 PM
  2. Compiler handling 'outportb' & 'sleep()'
    By asbus in forum C++ Programming
    Replies: 1
    Last Post: 10-26-2009, 06:23 AM
  3. Storing information created files.
    By GCNDoug in forum C Programming
    Replies: 12
    Last Post: 05-07-2007, 03:18 PM
  4. Help: Finding only Last modified file or Created file
    By lagrz in forum C++ Programming
    Replies: 3
    Last Post: 01-03-2006, 04:49 PM
  5. user created header files
    By MedicKth in forum C++ Programming
    Replies: 6
    Last Post: 09-20-2003, 12:36 PM